Skip to content

Commit

Permalink
Merge pull request #2379 from mtrmac/redundant
Browse files Browse the repository at this point in the history
Avoid a redundant function call
  • Loading branch information
rhatdan committed Apr 23, 2024
2 parents fb2056a + 55c3194 commit 387b45a
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 2 deletions.
2 changes: 1 addition & 1 deletion copy/single.go
Expand Up @@ -704,7 +704,7 @@ func (ic *imageCopier) copyLayer(ctx context.Context, srcInfo types.BlobInfo, to
canChangeLayerCompression := ic.src.CanChangeLayerCompression(srcInfo.MediaType)
logrus.Debugf("Checking if we can reuse blob %s: general substitution = %v, compression for MIME type %q = %v",
srcInfo.Digest, ic.canSubstituteBlobs, srcInfo.MediaType, canChangeLayerCompression)
canSubstitute := ic.canSubstituteBlobs && ic.src.CanChangeLayerCompression(srcInfo.MediaType)
canSubstitute := ic.canSubstituteBlobs && canChangeLayerCompression

var requiredCompression *compressiontypes.Algorithm
if ic.requireCompressionFormatMatch {
Expand Down
1 change: 0 additions & 1 deletion storage/storage_dest.go
Expand Up @@ -930,7 +930,6 @@ func (s *storageImageDestination) untrustedLayerDiffID(layerIndex int) (digest.D
// nothing is writing to s.manifest yet, or PutManifest has been called and s.manifest != nil.
// Either way this function does not need the protection of s.lock.
if s.manifest == nil {
logrus.Debugf("Skipping commit for layer %d, manifest not yet available", layerIndex)
return "", nil
}

Expand Down

0 comments on commit 387b45a

Please sign in to comment.