summaryrefslogtreecommitdiffstats
path: root/integrations/migration-test/migration_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 /integrations/migration-test/migration_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 'integrations/migration-test/migration_test.go')
-rw-r--r--integrations/migration-test/migration_test.go2
1 files changed, 1 insertions, 1 deletions
diff --git a/integrations/migration-test/migration_test.go b/integrations/migration-test/migration_test.go
index 45e31ff9ac..83c31d8018 100644
--- a/integrations/migration-test/migration_test.go
+++ b/integrations/migration-test/migration_test.go
@@ -62,7 +62,7 @@ func initMigrationTest(t *testing.T) func() {
assert.True(t, len(setting.RepoRootPath) != 0)
assert.NoError(t, util.RemoveAll(setting.RepoRootPath))
assert.NoError(t, unittest.CopyDir(path.Join(filepath.Dir(setting.AppPath), "integrations/gitea-repositories-meta"), setting.RepoRootPath))
- assert.NoError(t, git.InitWithConfigSync(context.Background()))
+ assert.NoError(t, git.InitOnceWithSync(context.Background()))
ownerDirs, err := os.ReadDir(setting.RepoRootPath)
if err != nil {
assert.NoError(t, err, "unable to read the new repo root: %v\n", err)