Skip to content

Commit

Permalink
Merge pull request argoproj-labs#7 from rohankmr414/ref-delta
Browse files Browse the repository at this point in the history
plumbing: resolve non-external delta references
  • Loading branch information
sarabala1979 committed Jan 14, 2023
2 parents 3ac2073 + 28afdf1 commit 75279d8
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions plumbing/format/packfile/parser.go
Expand Up @@ -234,6 +234,15 @@ func (p *Parser) indexObjects() error {
return err
}

// move children of placeholder parent into actual parent in case this was
// a non-external delta reference
if placeholder, ok := p.oiByHash[sha1]; ok {
ota.Children = placeholder.Children
for _, c := range ota.Children {
c.Parent = ota
}
}

ota.SHA1 = sha1
p.oiByHash[ota.SHA1] = ota
}
Expand Down

0 comments on commit 75279d8

Please sign in to comment.