mirror of
https://github.com/containers/skopeo.git
synced 2025-07-01 17:12:32 +00:00
Clarify control flow when handling the tags list
Don't run the the "tags specified" loop when tags should be discovered. Should not change behavior. Signed-off-by: Miloslav Trmač <mitr@redhat.com>
This commit is contained in:
parent
677c29bf24
commit
0ae9db5dd6
@ -280,6 +280,7 @@ func imagesToCopyFromRegistry(registryName string, cfg registrySyncConfig, sourc
|
|||||||
}).Info("Processing repo")
|
}).Info("Processing repo")
|
||||||
|
|
||||||
var sourceReferences []types.ImageReference
|
var sourceReferences []types.ImageReference
|
||||||
|
if len(tags) != 0 {
|
||||||
for _, tag := range tags {
|
for _, tag := range tags {
|
||||||
source := fmt.Sprintf("%s:%s", repoName, tag)
|
source := fmt.Sprintf("%s:%s", repoName, tag)
|
||||||
|
|
||||||
@ -293,8 +294,7 @@ func imagesToCopyFromRegistry(registryName string, cfg registrySyncConfig, sourc
|
|||||||
}
|
}
|
||||||
sourceReferences = append(sourceReferences, imageRef)
|
sourceReferences = append(sourceReferences, imageRef)
|
||||||
}
|
}
|
||||||
|
} else { // len(tags) == 0
|
||||||
if len(tags) == 0 {
|
|
||||||
logrus.WithFields(logrus.Fields{
|
logrus.WithFields(logrus.Fields{
|
||||||
"repo": imageName,
|
"repo": imageName,
|
||||||
"registry": registryName,
|
"registry": registryName,
|
||||||
|
Loading…
Reference in New Issue
Block a user