Attribute reader shutdown failures to checks that read content

This commit is contained in:
2026-10-09 03:07:13 +00:00
parent 6eec022bb0
commit 7d92c477c2
4 changed files with 44 additions and 15 deletions

View File

@@ -19,6 +19,7 @@ type CandidateTree struct {
byPath map[string]int
directories map[string]struct{}
blobReader *git.BlobReader
blobReads uint64
symlinkTargets map[string]string
closed bool
closeErr error
@@ -113,6 +114,7 @@ func (tree *CandidateTree) readBlob(ctx context.Context, entry git.TreeEntry) ([
}
tree.blobReader = git.NewBlobReader(operationContext, tree.repositoryDir)
}
tree.blobReads++
contents, err := tree.blobReader.Read(ctx, entry.ObjectID)
if err != nil {
return nil, fmt.Errorf("read committed path %q: %w", entry.Path, err)