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/indexer/stats/indexer_test.go | 5 ----- 1 file changed, 5 deletions(-) (limited to 'modules/indexer') diff --git a/modules/indexer/stats/indexer_test.go b/modules/indexer/stats/indexer_test.go index a335972c21..a4a8b63241 100644 --- a/modules/indexer/stats/indexer_test.go +++ b/modules/indexer/stats/indexer_test.go @@ -13,7 +13,6 @@ import ( "code.gitea.io/gitea/models/db" repo_model "code.gitea.io/gitea/models/repo" "code.gitea.io/gitea/models/unittest" - "code.gitea.io/gitea/modules/git" "code.gitea.io/gitea/modules/queue" "code.gitea.io/gitea/modules/setting" @@ -30,10 +29,6 @@ func TestMain(m *testing.M) { } func TestRepoStatsIndex(t *testing.T) { - if err := git.InitWithConfigSync(context.Background()); !assert.NoError(t, err) { - return - } - assert.NoError(t, unittest.PrepareTestDatabase()) setting.Cfg = ini.Empty() -- cgit v1.2.3