浏览代码

Always HEAD blobs at least once during pushes

Signed-off-by: Jon Johnson <jonjohnson@google.com>
Jon Johnson 8 年之前
父节点
当前提交
cdc46abde5
共有 1 个文件被更改,包括 2 次插入2 次删除
  1. 2 2
      distribution/push_v2.go

+ 2 - 2
distribution/push_v2.go

@@ -283,8 +283,8 @@ func (pd *v2PushDescriptor) Upload(ctx context.Context, progressOutput progress.
 	// Do we have any metadata associated with this layer's DiffID?
 	v2Metadata, err := pd.v2MetadataService.GetMetadata(diffID)
 	if err == nil {
-		// check for blob existence in the target repository if we have a mapping with it
-		descriptor, exists, err := pd.layerAlreadyExists(ctx, progressOutput, diffID, false, 1, v2Metadata)
+		// check for blob existence in the target repository
+		descriptor, exists, err := pd.layerAlreadyExists(ctx, progressOutput, diffID, true, 1, v2Metadata)
 		if exists || err != nil {
 			return descriptor, err
 		}