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
+2 -2
View File
@@ -205,7 +205,7 @@ func runTestGitPush(t *testing.T, u *url.URL, gitOperation func(t *testing.T, gi
doGitAddRemote(gitPath, "origin", u)(t)
gitRepo, err := git.OpenRepository(t.Context(), gitPath)
gitRepo, err := git.OpenRepository(gitPath)
require.NoError(t, err)
defer gitRepo.Close()
@@ -229,7 +229,7 @@ func runTestGitPush(t *testing.T, u *url.URL, gitOperation func(t *testing.T, gi
deleted := deletedBranchesMap[branchName]
assert.True(t, ok, "branch %s not found in database", branchName)
assert.Equal(t, deleted, branch.IsDeleted, "IsDeleted of %s is %v, but it's expected to be %v", branchName, branch.IsDeleted, deleted)
commitID, err := gitRepo.GetBranchCommitID(branchName)
commitID, err := gitRepo.GetBranchCommitID(t.Context(), branchName)
require.NoError(t, err)
assert.Equal(t, commitID, branch.CommitID)
}