Fix data-race problems in git module (quick patch) (#19934)

* Fix data-race problems in git module

* use HomeDir instead of setting.RepoRootPath

Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
This commit is contained in:
2022-06-11 11:56:27 +08:00
committed by GitHub
parent 23422f9909
commit 88f2e457d8
8 changed files with 46 additions and 55 deletions

View File

@ -102,7 +102,7 @@ func GlobalInitInstalled(ctx context.Context) {
log.Fatal("Gitea is not installed")
}
mustInitCtx(ctx, git.InitWithConfigSync)
mustInitCtx(ctx, git.InitOnceWithSync)
log.Info("Git Version: %s (home: %s)", git.VersionInfo(), git.HomeDir())
git.CheckLFSVersion()