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
@@ -25,7 +25,7 @@ type Note struct {
// FIXME: Add LastCommitCache support
func GetNote(ctx context.Context, repo *Repository, commitID string, note *Note) error {
log.Trace("Searching for git note corresponding to the commit %q in the repository %q", commitID, repo.Path)
notes, err := repo.GetCommit(NotesRef)
notes, err := repo.GetCommit(ctx, NotesRef)
if err != nil {
if IsErrNotExist(err) {
return err
@@ -62,7 +62,7 @@ func GetNote(ctx context.Context, repo *Repository, commitID string, note *Note)
}
blob := entry.Blob(repo)
dataRc, err := blob.DataAsync()
dataRc, err := blob.DataAsync(ctx)
if err != nil {
log.Error("Unable to read blob with ID %q. Error: %v", blob.ID, err)
return err