Skip to content

Commit

Permalink
Apply suggestions from code review
Browse files Browse the repository at this point in the history
Signed-off-by: Wei Meng <[email protected]>
  • Loading branch information
m5i-work committed Jul 20, 2022
1 parent a1e9637 commit 3072b1b
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions copy.go
Original file line number Diff line number Diff line change
Expand Up @@ -352,12 +352,11 @@ func prepareCopy(ctx context.Context, dst Target, dstRef string, proxy *cas.Prox
if !descriptor.EqualOCI(desc, root) {
return nil
}
// copy reference for skipped root
// enforce tagging when root manifest is skipped
if refPusher, ok := dst.(registry.ReferencePusher); ok {
return copyCachedNodeWithReference(ctx, proxy, refPusher, desc, dstRef)
} else {
return dst.Tag(ctx, root, dstRef)
}
return dst.Tag(ctx, root, dstRef)
}

return nil
Expand Down

0 comments on commit 3072b1b

Please sign in to comment.