diff options
Diffstat (limited to 'storage')
-rw-r--r-- | storage/filesystem/object.go | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/storage/filesystem/object.go b/storage/filesystem/object.go index bc2b121..5073a38 100644 --- a/storage/filesystem/object.go +++ b/storage/filesystem/object.go @@ -352,7 +352,7 @@ func (s *ObjectStorage) buildPackfileIters(t plumbing.ObjectType, seen map[plumb return nil, err } - iter, err := newPackfileIter(pack, t, seen, s.index[h]) + iter, err := newPackfileIter(pack, t, seen, s.index[h], s.DeltaBaseCache) if err != nil { return nil, err } @@ -374,11 +374,11 @@ type packfileIter struct { } func NewPackfileIter(f billy.File, t plumbing.ObjectType) (storer.EncodedObjectIter, error) { - return newPackfileIter(f, t, make(map[plumbing.Hash]bool), nil) + return newPackfileIter(f, t, make(map[plumbing.Hash]bool), nil, nil) } func newPackfileIter(f billy.File, t plumbing.ObjectType, seen map[plumbing.Hash]bool, - index *packfile.Index) (storer.EncodedObjectIter, error) { + index *packfile.Index, cache cache.Object) (storer.EncodedObjectIter, error) { s := packfile.NewScanner(f) _, total, err := s.Header() if err != nil { @@ -391,6 +391,7 @@ func newPackfileIter(f billy.File, t plumbing.ObjectType, seen map[plumbing.Hash } d.SetIndex(index) + d.DeltaBaseCache = cache return &packfileIter{ f: f, |