fix: git cmd (#38084) (#38087)

Backport #38084

fix #37370

Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
This commit is contained in:
Giteabot
2026-06-12 06:28:13 -07:00
committed by GitHub
parent 617b6948b1
commit 3bebddedc0
4 changed files with 15 additions and 3 deletions
+2 -1
View File
@@ -47,7 +47,8 @@ func NewTemporaryUploadRepository(repo *repo_model.Repository) (*TemporaryUpload
// Close the repository cleaning up all files
func (t *TemporaryUploadRepository) Close() {
defer t.gitRepo.Close()
// must stop the repo access before removal, otherwise Windows can't remove the directory occupied by other processes
t.gitRepo.Close()
if t.cleanup != nil {
t.cleanup()
}