summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMiloslav Trmač <mitr@redhat.com>2018-07-27 03:34:04 +0200
committerAtomic Bot <atomic-devel@projectatomic.io>2018-08-01 18:22:58 +0000
commitd4dbe6677439b91e55ee48c23edfd8f80d61c05d (patch)
tree08117732842f239906680dc74363d55936abbca7
parent0ef38ba07971ea9921a98353789fdb5655e65c10 (diff)
downloadpodman-d4dbe6677439b91e55ee48c23edfd8f80d61c05d.tar.gz
podman-d4dbe6677439b91e55ee48c23edfd8f80d61c05d.tar.bz2
podman-d4dbe6677439b91e55ee48c23edfd8f80d61c05d.zip
Reorganize the tag loading in DockerArchive case
This should not change behavior, only to make future edits for an early exit easier to review. Signed-off-by: Miloslav Trmač <mitr@redhat.com> Closes: #1176 Approved by: rhatdan
-rw-r--r--libpod/image/pull.go8
1 files 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)