Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

image/tree: Print longest names first and use full width #5757

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

vvoland
Copy link
Collaborator

@vvoland vvoland commented Jan 17, 2025

When printing image names, sort them by length and print the longest first. This also allows them to use a full terminal width because they are not printed alongside other columns.

Before
image

After
image

- Description for the changelog

Fix `docker images --tree` unnecessary truncating long image names when multiple names are available

- A picture of a cute animal (not mandatory but encouraged)

When printing image names, sort them by length and print the longest
first. This also allows them to use a full terminal width because they
are not printed alongside other columns.

Signed-off-by: Paweł Gronowski <pawel.gronowski@docker.com>
@codecov-commenter
Copy link

codecov-commenter commented Jan 17, 2025

Codecov Report

Attention: Patch coverage is 0% with 12 lines in your changes missing coverage. Please review.

Project coverage is 59.45%. Comparing base (f4a68da) to head (708b732).

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #5757      +/-   ##
==========================================
- Coverage   59.47%   59.45%   -0.02%     
==========================================
  Files         346      346              
  Lines       29367    29375       +8     
==========================================
  Hits        17465    17465              
- Misses      10929    10937       +8     
  Partials      973      973              

@vvoland vvoland requested review from a team and laurazard January 17, 2025 14:47
# for free to join this conversation on GitHub. Already have an account? # to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants