Skip to content

Commit

Permalink
storage: filesystem, Ensure index is populated before use. Fixes go-g…
Browse files Browse the repository at this point in the history
  • Loading branch information
AriehSchneier committed Mar 27, 2023
1 parent 3f1cfde commit 64625e2
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions storage/filesystem/object.go
Expand Up @@ -545,6 +545,9 @@ func (s *ObjectStorage) HashesWithPrefix(prefix []byte) ([]plumbing.Hash, error)

// TODO: This could be faster with some idxfile changes,
// or diving into the packfile.
if err := s.requireIndex(); err != nil {
return nil, err
}
for _, index := range s.index {
ei, err := index.Entries()
if err != nil {
Expand Down

0 comments on commit 64625e2

Please sign in to comment.