refactor: remove Ctx field from git.Repository (#38500)

This commit is contained in:
wxiaoguang
2026-07-17 18:44:31 +08:00
committed by GitHub
parent 2c8e99bbf7
commit 5b078f72aa
235 changed files with 1234 additions and 1258 deletions
+3 -3
View File
@@ -811,7 +811,7 @@ func doCreateAgitFlowPull(dstPath string, ctx *APITestContext, headBranch string
return
}
gitRepo, err := git.OpenRepository(t.Context(), dstPath)
gitRepo, err := git.OpenRepository(dstPath)
require.NoError(t, err)
defer gitRepo.Close()
@@ -848,7 +848,7 @@ func doCreateAgitFlowPull(dstPath string, ctx *APITestContext, headBranch string
Message: "Testing commit 1",
})
assert.NoError(t, err)
commit, err = gitRepo.GetRefCommitID("HEAD")
commit, err = gitRepo.GetRefCommitID(t.Context(), "HEAD")
assert.NoError(t, err)
})
@@ -920,7 +920,7 @@ func doCreateAgitFlowPull(dstPath string, ctx *APITestContext, headBranch string
Message: "Testing commit 2",
})
assert.NoError(t, err)
commit, err = gitRepo.GetRefCommitID("HEAD")
commit, err = gitRepo.GetRefCommitID(t.Context(), "HEAD")
assert.NoError(t, err)
})