-
Notifications
You must be signed in to change notification settings - Fork 2.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add --no-trunc to artifact ls #25182
Conversation
im going to add some tests here still |
0538904
to
4dcffce
Compare
ok, tests added |
cmd/podman/artifact/list.go
Outdated
|
||
artifactHash := artifactDigest.Encoded() | ||
// If the user does not want truncated hashes | ||
formatHash := func() string { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not sure why we would need to define a extra function here.
if !listFlag.noTrunc {
artifactHash = artifactHash[0:12]
}
This would do the same thing without an extra function call.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
i meant to delete line 101.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
reverted ... i felt funny about the fact that having a conditional check on something that was by default ... but i inverted the logic a tad, see how you like it.
4dcffce
to
f04ca8d
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: baude, Luap99 The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
I want to cherry-pick this into 5.4 if nobody minds. Technically a feature but small enough that I think it makes sense to make the change as early as possible and not have people live with a slightly different format until 5.5 comes out |
LGTM but needs a rebase |
added a --no-trunc flag to artifact ls, which follows what images has done. by default now, the ls output will have the shortened 12 character digest. the --no-trunc will output the full digest. Signed-off-by: Brent Baude <[email protected]>
f04ca8d
to
d575ae1
Compare
/lgtm |
/cherry-pick v5.4 |
@mheon: once the present PR merges, I will cherry-pick it on top of In response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. |
@mheon: #25182 failed to apply on top of branch "v5.4":
In response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. |
added a --no-trunc flag to artifact ls, which follows what images has done. by default now, the ls output will have the shortened 12 character digest. the --no-trunc will output the full digest.
Does this PR introduce a user-facing change?