From a84d4a81994b484236d65b36dc8ad62c06c4e21b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Miloslav=20Trma=C4=8D?= Date: Mon, 29 Nov 2021 15:33:40 +0100 Subject: [PATCH] Link the two variants of cannotModifyManifest*Reason together. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Miloslav Trmač --- copy/copy.go | 2 ++ 1 file changed, 2 insertions(+) diff --git a/copy/copy.go b/copy/copy.go index 5aed39c95..317f8922a 100644 --- a/copy/copy.go +++ b/copy/copy.go @@ -433,6 +433,7 @@ func (c *copier) copyMultipleImages(ctx context.Context, policyContext *signatur // Determine if we're allowed to modify the manifest list. // If we can, set to the empty string. If we can't, set to the reason why. + // Compare, and perhaps keep in sync with, the version in copyOneImage. cannotModifyManifestListReason := "" if len(sigs) > 0 { cannotModifyManifestListReason = "Would invalidate signatures" @@ -663,6 +664,7 @@ func (c *copier) copyOneImage(ctx context.Context, policyContext *signature.Poli // Determine if we're allowed to modify the manifest. // If we can, set to the empty string. If we can't, set to the reason why. + // Compare, and perhaps keep in sync with, the version in copyMultipleImages. cannotModifyManifestReason := "" if len(sigs) > 0 { cannotModifyManifestReason = "Would invalidate signatures"