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

This commit is contained in:
wxiaoguang authored and GitHub committed 2026-07-17 18:44:31 +08:00
1 parent 2c8e99bbf7
commit 5b078f72aa
235 files changed
+1234 -1258

No files matched your search

+2 -2
View File
@@ -11,7 +11,7 @@ import (
)
func TestGrepSearch(t *testing.T) {
repo, err := OpenRepository(t.Context(), filepath.Join(testReposDir, "language_stats_repo"))
repo, err := OpenRepository(filepath.Join(testReposDir, "language_stats_repo"))
assert.NoError(t, err)
defer repo.Close()
@@ -74,7 +74,7 @@ func TestGrepSearch(t *testing.T) {
assert.NoError(t, err)
assert.Empty(t, res)
res, err = GrepSearch(t.Context(), &Repository{Path: "no-such-git-repo"}, "no-such-content", GrepOptions{})
res, err = GrepSearch(t.Context(), &Repository{RepositoryBase: RepositoryBase{Path: "no-such-git-repo"}}, "no-such-content", GrepOptions{})
assert.Error(t, err)
assert.Empty(t, res)
}