Skip to content
This repository has been archived by the owner on Sep 11, 2020. It is now read-only.

Commit

Permalink
rebase-squashed branch fix-reference-delta-not-found
Browse files Browse the repository at this point in the history
  • Loading branch information
Kevin Burge committed Apr 10, 2022
1 parent 8b0c211 commit b7346f9
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions plumbing/format/packfile/parser.go
Original file line number Diff line number Diff line change
Expand Up @@ -286,6 +286,18 @@ func (p *Parser) resolveDeltas() error {
if err := p.resolveObject(ioutil.Discard, child, content); err != nil {
return err
}

extRef, ok := p.oiByHash[child.SHA1]
if ok && extRef.ExternalRef {
// replace parent placeholder
p.oiByHash[child.SHA1] = child

// adopt children
child.Children = extRef.Children
for _, c := range child.Children {
c.Parent = child
}
}
}

// Remove the delta from the cache.
Expand Down

0 comments on commit b7346f9

Please sign in to comment.