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

fix "reference delta not found" when cloning from aws codecommit #1086

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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