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

Close the gitrepo when deleting the repository #15876

Merged

Conversation

zeripath
Copy link
Contributor

Close gitrepos before trying to delete repositories to ensure windows drops its file locks.

Fix #15864

Signed-off-by: Andrew Thornton art27@cantab.net

Signed-off-by: Andrew Thornton <art27@cantab.net>
@zeripath zeripath added this to the 1.15.0 milestone May 14, 2021
@codecov-commenter
Copy link

codecov-commenter commented May 14, 2021

Codecov Report

Merging #15876 (c2b7108) into main (f6be429) will increase coverage by 0.00%.
The diff coverage is 28.57%.

Impacted file tree graph

@@           Coverage Diff           @@
##             main   #15876   +/-   ##
=======================================
  Coverage   44.00%   44.00%           
=======================================
  Files         681      681           
  Lines       82263    82270    +7     
=======================================
+ Hits        36196    36200    +4     
- Misses      40159    40162    +3     
  Partials     5908     5908           
Impacted Files Coverage Δ
modules/migrations/gitea_uploader.go 7.47% <0.00%> (-0.02%) ⬇️
routers/admin/repos.go 0.00% <0.00%> (ø)
routers/api/v1/repo/repo.go 57.71% <0.00%> (-0.28%) ⬇️
routers/repo/setting.go 13.61% <100.00%> (+0.25%) ⬆️
modules/process/manager.go 75.30% <0.00%> (+2.46%) ⬆️

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 f6be429...c2b7108. Read the comment docs.

@GiteaBot GiteaBot added the lgtm/need 2 This PR needs two approvals by maintainers to be considered for merging. label May 14, 2021
@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 May 14, 2021
@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 May 14, 2021
@zeripath zeripath merged commit d0ea10b into go-gitea:main May 14, 2021
@zeripath zeripath deleted the fix-15864-close-gitrepo-before-deleting branch May 14, 2021 20:19
@lunny
Copy link
Member

lunny commented May 15, 2021

Please send backport to v1.14

6543 pushed a commit to 6543-forks/gitea that referenced this pull request May 15, 2021
Signed-off-by: Andrew Thornton <art27@cantab.net>
@6543 6543 added the backport/done All backports for this PR have been created label May 15, 2021
@6543
Copy link
Member

6543 commented May 15, 2021

-> #15887

lafriks pushed a commit that referenced this pull request May 15, 2021
Signed-off-by: Andrew Thornton <art27@cantab.net>

Co-authored-by: zeripath <art27@cantab.net>
AbdulrhmnGhanem pushed a commit to kitspace/gitea that referenced this pull request Aug 10, 2021
Signed-off-by: Andrew Thornton <art27@cantab.net>
@go-gitea go-gitea locked and limited conversation to collaborators Oct 19, 2021
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.

[Bug] Delete Repo Fails On Windows
6 participants