From 88f2e457d891c4e91a9eddab8143d0109e08dfa9 Mon Sep 17 00:00:00 2001 From: wxiaoguang Date: Sat, 11 Jun 2022 11:56:27 +0800 Subject: 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 --- modules/git/git_test.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'modules/git/git_test.go') 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) } -- cgit v1.2.3