Skip to content

Commit

Permalink
optimize for loop with rootfs.DiffIDs
Browse files Browse the repository at this point in the history
Signed-off-by: lixiaobing10051267 <[email protected]>
  • Loading branch information
lixiaobing1 committed Jun 27, 2017
1 parent bcc8b2b commit 80b2c32
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion distribution/push_v2.go
Original file line number Diff line number Diff line change
Expand Up @@ -147,7 +147,7 @@ func (p *v2Pusher) pushV2Tag(ctx context.Context, ref reference.NamedTagged, id
}

// Loop bounds condition is to avoid pushing the base layer on Windows.
for i := 0; i < len(rootfs.DiffIDs); i++ {
for range rootfs.DiffIDs {
descriptor := descriptorTemplate
descriptor.layer = l
descriptor.checkedDigests = make(map[digest.Digest]struct{})
Expand Down

0 comments on commit 80b2c32

Please sign in to comment.