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 forking an empty repository #6637

Merged
merged 2 commits into from
Apr 15, 2019

Conversation

segevfiner
Copy link
Contributor

Forking an empty repo didn't copy the IsEmpty flag which lead to Git errors, and once we did copy it, the repoAssignment middleware didn't populate BaseRepo which lead to a nil error from the templates.

Fixes #6633 (Assuming there aren't issues in other places)

cc @shay-k

Fixes go-gitea#6633

Signed-off-by: Segev Finer <segev@codeocean.com>
@codecov-io
Copy link

codecov-io commented Apr 15, 2019

Codecov Report

Merging #6637 into master will increase coverage by <.01%.
The diff coverage is 50%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #6637      +/-   ##
==========================================
+ Coverage   40.53%   40.53%   +<.01%     
==========================================
  Files         406      406              
  Lines       54492    54494       +2     
==========================================
+ Hits        22086    22088       +2     
  Misses      29370    29370              
  Partials     3036     3036
Impacted Files Coverage Δ
models/repo.go 46.95% <100%> (+0.03%) ⬆️
modules/context/repo.go 58.48% <40%> (+0.08%) ⬆️

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 3fb038c...cc55760. Read the comment docs.

@GiteaBot GiteaBot added the lgtm/need 2 This PR needs two approvals by maintainers to be considered for merging. label Apr 15, 2019
@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 Apr 15, 2019
@techknowlogick techknowlogick added this to the 1.9.0 milestone Apr 15, 2019
@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 Apr 15, 2019
@techknowlogick techknowlogick merged commit ecfa5f1 into go-gitea:master Apr 15, 2019
@segevfiner segevfiner deleted the fork-empty-bug branch April 15, 2019 20:52
@lunny
Copy link
Member

lunny commented Apr 16, 2019

This should be back port to v1.8

segevfiner added a commit to codeocean/gitea that referenced this pull request Apr 16, 2019
Fixes go-gitea#6633

Signed-off-by: Segev Finer <segev@codeocean.com>
@techknowlogick techknowlogick added the backport/done All backports for this PR have been created label Apr 16, 2019
zeripath pushed a commit that referenced this pull request Apr 16, 2019
Fixes #6633

Signed-off-by: Segev Finer <segev@codeocean.com>
@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
backport/done All backports for this PR have been created lgtm/done This PR has enough approvals to get merged. There are no important open reservations anymore. type/bug
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Forking an empty repo via the API leads to a repo that throws a 500 error
7 participants