diff options
Diffstat (limited to 'plumbing')
-rw-r--r-- | plumbing/format/packfile/packfile.go | 18 |
1 files changed, 11 insertions, 7 deletions
diff --git a/plumbing/format/packfile/packfile.go b/plumbing/format/packfile/packfile.go index 52eb338..0dd9730 100644 --- a/plumbing/format/packfile/packfile.go +++ b/plumbing/format/packfile/packfile.go @@ -500,15 +500,19 @@ func (i *objectIter) Next() (plumbing.EncodedObject, error) { return nil, err } - typ, err := i.p.getObjectType(h) - if err != nil { - return nil, err - } - if typ != i.typ { - continue + if h.Type == plumbing.REFDeltaObject || h.Type == plumbing.OFSDeltaObject { + obj, err := i.p.getNextObject(h, e.Hash) + if err != nil { + return nil, err + } + if obj.Type() == i.typ { + return obj, nil + } + } else if h.Type == i.typ { + return i.p.getNextObject(h, e.Hash) } - return i.p.getNextObject(h, e.Hash) + continue } } |