-
-
Notifications
You must be signed in to change notification settings - Fork 5.8k
Make archive prefixing configurable with a global setting #9943
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
Conversation
// CreateArchive create archive content to the target path | ||
func (c *Commit) CreateArchive(target string, opts CreateArchiveOpts) error { | ||
if opts.Format.String() == "unknown" { | ||
return fmt.Errorf("unknown format: %v", opts.Format) |
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.
@guillep2k this is the line I was referencing.
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.
Thanks! I'd missed it.
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.
One nit that's of no real consequence, so either way LGTM.
|
||
// CreateArchive create archive content to the target path | ||
func (c *Commit) CreateArchive(target string, opts CreateArchiveOpts) error { | ||
if opts.Format.String() == "unknown" { |
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.
Perhaps, if anything, we could add another constant for UNKNOWN
and compare to that rather than a 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.
It doesn't really seem worth it - the unknown is only used in that file and in those two places.
Codecov Report
@@ Coverage Diff @@
## master #9943 +/- ##
=========================================
Coverage ? 42.28%
=========================================
Files ? 608
Lines ? 79411
Branches ? 0
=========================================
Hits ? 33580
Misses ? 41691
Partials ? 4140 Continue to review full report at Codecov.
|
Add a global setting to default git archive prefixing.
Fix #9903