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

Make archive prefixing configurable with a global setting #9943

Merged
merged 4 commits into from
Jan 22, 2020

Conversation

zeripath
Copy link
Contributor

Add a global setting to default git archive prefixing.

Fix #9903

@zeripath zeripath added the type/feature Completely new functionality. Can only be merged if feature freeze is not active. label Jan 22, 2020
@GiteaBot GiteaBot added the lgtm/need 2 This PR needs two approvals by maintainers to be considered for merging. label Jan 22, 2020
@GiteaBot GiteaBot added lgtm/need 1 This PR needs approval from one additional maintainer to be merged. and removed lgtm/need 2 This PR needs two approvals by maintainers to be considered for merging. labels Jan 22, 2020
@GiteaBot GiteaBot added lgtm/done This PR has enough approvals to get merged. There are no important open reservations anymore. and removed lgtm/need 1 This PR needs approval from one additional maintainer to be merged. labels Jan 22, 2020
// 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)
Copy link
Member

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.

Copy link
Member

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.

Copy link
Member

@jolheiser jolheiser left a 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" {
Copy link
Member

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?

Copy link
Contributor Author

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-io
Copy link

Codecov Report

❗ No coverage uploaded for pull request base (master@94d575b). Click here to learn what that means.
The diff coverage is n/a.

Impacted file tree graph

@@            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.

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

@zeripath zeripath merged commit c8d7ae1 into go-gitea:master Jan 22, 2020
@zeripath zeripath added this to the 1.12.0 milestone Jan 22, 2020
@zeripath zeripath deleted the encapsulate-archives branch January 22, 2020 23:47
@go-gitea go-gitea locked and limited conversation to collaborators Nov 24, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
lgtm/done This PR has enough approvals to get merged. There are no important open reservations anymore. type/feature Completely new functionality. Can only be merged if feature freeze is not active.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Ability to Modify Archive Download Structure
6 participants