From d4dbe6677439b91e55ee48c23edfd8f80d61c05d Mon Sep 17 00:00:00 2001 From: Miloslav Trmač Date: Fri, 27 Jul 2018 03:34:04 +0200 Subject: Reorganize the tag loading in DockerArchive case MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This should not change behavior, only to make future edits for an early exit easier to review. Signed-off-by: Miloslav Trmač Closes: #1176 Approved by: rhatdan --- libpod/image/pull.go | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/libpod/image/pull.go b/libpod/image/pull.go index 2b3f70441..406fa0eaf 100644 --- a/libpod/image/pull.go +++ b/libpod/image/pull.go @@ -110,17 +110,17 @@ func refNamesFromImageReference(ctx context.Context, srcRef types.ImageReference } var dest []string - if len(manifest[0].RepoTags) > 0 { - dest = append(dest, manifest[0].RepoTags...) - } else { + if len(manifest[0].RepoTags) == 0 { // If the input image has no repotags, we need to feed it a dest anyways digest, err := getImageDigest(ctx, srcRef, sc) if err != nil { return nil, err } dest = append(dest, digest) + } else { + // Need to load in all the repo tags from the manifest + dest = append(dest, manifest[0].RepoTags...) } - // Need to load in all the repo tags from the manifest res := []*pullRefName{} for _, dst := range dest { pullInfo := getPullRefName(srcRef, dst) -- cgit v1.2.3-54-g00ecf