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
+4 -4
View File
@@ -14,7 +14,7 @@ import (
func TestRepository_GetBlob_Found(t *testing.T) {
repoPath := filepath.Join(testReposDir, "repo1_bare")
r, err := OpenRepository(t.Context(), repoPath)
r, err := OpenRepository(repoPath)
assert.NoError(t, err)
defer r.Close()
@@ -30,7 +30,7 @@ func TestRepository_GetBlob_Found(t *testing.T) {
blob, err := r.GetBlob(testCase.OID)
assert.NoError(t, err)
dataReader, err := blob.DataAsync()
dataReader, err := blob.DataAsync(t.Context())
assert.NoError(t, err)
data, err := io.ReadAll(dataReader)
@@ -42,7 +42,7 @@ func TestRepository_GetBlob_Found(t *testing.T) {
func TestRepository_GetBlob_NotExist(t *testing.T) {
repoPath := filepath.Join(testReposDir, "repo1_bare")
r, err := OpenRepository(t.Context(), repoPath)
r, err := OpenRepository(repoPath)
assert.NoError(t, err)
defer r.Close()
@@ -56,7 +56,7 @@ func TestRepository_GetBlob_NotExist(t *testing.T) {
func TestRepository_GetBlob_NoId(t *testing.T) {
repoPath := filepath.Join(testReposDir, "repo1_bare")
r, err := OpenRepository(t.Context(), repoPath)
r, err := OpenRepository(repoPath)
assert.NoError(t, err)
defer r.Close()