summaryrefslogtreecommitdiffstats
path: root/modules/git/git_test.go
diff options
context:
space:
mode:
authorwxiaoguang <wxiaoguang@gmail.com>2022-06-11 11:56:27 +0800
committerGitHub <noreply@github.com>2022-06-11 11:56:27 +0800
commit88f2e457d891c4e91a9eddab8143d0109e08dfa9 (patch)
tree7746767e490260ddfb2e28d3d9e142c29d3b2a14 /modules/git/git_test.go
parent23422f9909e9843308b4c6f2becca9ba1ad5cef2 (diff)
downloadgitea-88f2e457d891c4e91a9eddab8143d0109e08dfa9.tar.gz
gitea-88f2e457d891c4e91a9eddab8143d0109e08dfa9.zip
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>
Diffstat (limited to 'modules/git/git_test.go')
-rw-r--r--modules/git/git_test.go2
1 files changed, 1 insertions, 1 deletions
diff --git a/modules/git/git_test.go b/modules/git/git_test.go
index 5b1cd820e8..061c876cde 100644
--- a/modules/git/git_test.go
+++ b/modules/git/git_test.go
@@ -28,7 +28,7 @@ func testRun(m *testing.M) error {
defer util.RemoveAll(repoRootPath)
setting.RepoRootPath = repoRootPath
- if err = InitWithConfigSync(context.Background()); err != nil {
+ if err = InitOnceWithSync(context.Background()); err != nil {
return fmt.Errorf("failed to call Init: %w", err)
}