Skip to content
This repository has been archived by the owner on Jun 13, 2021. It is now read-only.

Don't show ID as repository in image ls #728

Merged
merged 1 commit into from
Nov 7, 2019

Conversation

zappy-shu
Copy link
Contributor

@zappy-shu zappy-shu commented Nov 6, 2019

- What I did

When running image ls images without a repository no longer print
their ID as their repository.

- How I did it

If the image isn't a reference.Named then print <none> instead of the FamiliarString for the REPOSITORY column

- How to verify it

Pull an image from hub by digest and then run app image ls --digest. The image in question should show the digest prefixed by the algorithm type. E.g.

REPOSITORY   TAG    DIGEST          APP IMAGE ID APP NAME
<none>       <none> sha256:<digest> <id>         <name>

- Description for the changelog

image ls prints <none> in as the repository when the image does not have a tag

- A picture of a cute animal (not mandatory)

animalissue2-1-43f2a278bdb53e2e

When running `image ls` images without a repository no longer print
their ID as their repository.

Signed-off-by: Nick Adcock <nick.adcock@docker.com>
@codecov
Copy link

codecov bot commented Nov 7, 2019

Codecov Report

Merging #728 into master will increase coverage by 0.56%.
The diff coverage is 100%.

Impacted file tree graph

@@            Coverage Diff            @@
##           master    #728      +/-   ##
=========================================
+ Coverage   70.94%   71.5%   +0.56%     
=========================================
  Files          61      60       -1     
  Lines        3493    3201     -292     
=========================================
- Hits         2478    2289     -189     
+ Misses        695     604      -91     
+ Partials      320     308      -12
Impacted Files Coverage Δ
internal/commands/image/list.go 83.67% <100%> (ø) ⬆️
internal/packager/init.go 61.68% <0%> (-9.13%) ⬇️
internal/commands/root.go 73.86% <0%> (-4.65%) ⬇️
internal/packager/cnab.go 97.91% <0%> (-0.09%) ⬇️
internal/names.go 100% <0%> (ø) ⬆️
internal/commands/inspect.go
internal/inspect/inspect.go 86.88% <0%> (+8.09%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 8acd0a8...c19f7d4. Read the comment docs.

@zappy-shu zappy-shu changed the title WIP Don't show ID as repository in image ls Don't show ID as repository in image ls Nov 7, 2019
@rumpl rumpl merged commit 71ad534 into docker:master Nov 7, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants