Skip to content
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

Fix copy without any flag set #3409

Merged
merged 1 commit into from Dec 5, 2023
Merged

Conversation

haydentherapper
Copy link
Contributor

@haydentherapper haydentherapper commented Dec 4, 2023

PR #3247 added an --only flag which when set copies only a subset of metadata. By default the flag is set to an empty string, meaning that by default copy would copy nothing. This PR fixes this bug so that if only is unset, copy defaults to the same behavior as before copying everything.

Also update the tag name to be sig rather than sign for the flag.

Fixes #3379

Summary

Release Note

Documentation

PR sigstore#3247 added an --only flag which when set copies only a subset of
metadata. By default the flag is set to an empty string, meaning that by
default copy would copy nothing. This PR fixes this bug so that if only
is unset, copy defaults to the same behavior as before copying
everything.

Also update the tag name to be sig rather than sign for the flag.

Signed-off-by: Hayden Blauzvern <hblauzvern@google.com>
Copy link

codecov bot commented Dec 4, 2023

Codecov Report

Attention: 8 lines in your changes are missing coverage. Please review.

Comparison is base (29ca73f) 30.21% compared to head (997aed5) 30.38%.

Files Patch % Lines
cmd/cosign/cli/copy/copy.go 45.45% 3 Missing and 3 partials ⚠️
cmd/cosign/cli/copy.go 0.00% 2 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #3409      +/-   ##
==========================================
+ Coverage   30.21%   30.38%   +0.17%     
==========================================
  Files         155      155              
  Lines        9966     9971       +5     
==========================================
+ Hits         3011     3030      +19     
+ Misses       6505     6490      -15     
- Partials      450      451       +1     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Copy link
Contributor

@hectorj2f hectorj2f left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

@hectorj2f hectorj2f merged commit 593b9f2 into sigstore:main Dec 5, 2023
28 checks passed
@haydentherapper haydentherapper deleted the fix-only branch December 5, 2023 00:35
@github-actions github-actions bot added this to the v2.3.0 milestone Dec 5, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

cosign copy no longer copies signatures by default in 2.2.1
2 participants