mirror of
https://github.com/containers/podman.git
synced 2025-06-28 14:29:04 +08:00
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
This commit is contained in:

committed by
Atomic Bot

parent
0ef38ba079
commit
d4dbe66774
@ -110,17 +110,17 @@ func refNamesFromImageReference(ctx context.Context, srcRef types.ImageReference
|
|||||||
}
|
}
|
||||||
|
|
||||||
var dest []string
|
var dest []string
|
||||||
if len(manifest[0].RepoTags) > 0 {
|
if len(manifest[0].RepoTags) == 0 {
|
||||||
dest = append(dest, manifest[0].RepoTags...)
|
|
||||||
} else {
|
|
||||||
// If the input image has no repotags, we need to feed it a dest anyways
|
// If the input image has no repotags, we need to feed it a dest anyways
|
||||||
digest, err := getImageDigest(ctx, srcRef, sc)
|
digest, err := getImageDigest(ctx, srcRef, sc)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, err
|
return nil, err
|
||||||
}
|
}
|
||||||
dest = append(dest, digest)
|
dest = append(dest, digest)
|
||||||
}
|
} else {
|
||||||
// Need to load in all the repo tags from the manifest
|
// Need to load in all the repo tags from the manifest
|
||||||
|
dest = append(dest, manifest[0].RepoTags...)
|
||||||
|
}
|
||||||
res := []*pullRefName{}
|
res := []*pullRefName{}
|
||||||
for _, dst := range dest {
|
for _, dst := range dest {
|
||||||
pullInfo := getPullRefName(srcRef, dst)
|
pullInfo := getPullRefName(srcRef, dst)
|
||||||
|
Reference in New Issue
Block a user