refactor: remove Ctx field from git.Repository (#38500)

This commit is contained in:
wxiaoguang
2026-07-17 18:44:31 +08:00
committed by GitHub
parent 2c8e99bbf7
commit 5b078f72aa
235 changed files with 1234 additions and 1258 deletions
+2 -2
View File
@@ -122,13 +122,13 @@ func MigrateRepositoryGitData(ctx context.Context, u *user_model.User,
return nil, fmt.Errorf("updateGitRepoAfterCreate: %w", err)
}
gitRepo, err := gitrepo.OpenRepository(ctx, repo)
gitRepo, err := gitrepo.OpenRepository(repo)
if err != nil {
return repo, fmt.Errorf("OpenRepository: %w", err)
}
defer gitRepo.Close()
repo.IsEmpty, err = gitRepo.IsEmpty()
repo.IsEmpty, err = gitRepo.IsEmpty(ctx)
if err != nil {
return repo, fmt.Errorf("git.IsEmpty: %w", err)
}