Skip to content

Commit

Permalink
Hard-code docker.Transport use in pull --all-tags
Browse files Browse the repository at this point in the history
The code is already calling docker.GetRepositoryTags
immediately below, so the dependency already exists, and this
removes an unnecessary dependency on alltransports.

Should not change behavior.

Signed-off-by: Miloslav Trmač <[email protected]>

Closes: #1361
Approved by: rhatdan
  • Loading branch information
mtrmac authored and rh-atomic-bot committed Feb 27, 2019
1 parent b91be96 commit 6a60659
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions pull.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@ import (
"github.com/containers/image/signature"
is "github.com/containers/image/storage"
"github.com/containers/image/transports"
"github.com/containers/image/transports/alltransports"
"github.com/containers/image/types"
"github.com/containers/storage"
multierror "github.com/hashicorp/go-multierror"
Expand Down Expand Up @@ -176,9 +175,9 @@ func Pull(ctx context.Context, imageName string, options PullOptions) error {
}

repo := reference.TrimNamed(storageRef.DockerReference())
dockerRef, err := alltransports.ParseImageName(transport + storageRef.DockerReference().String())
dockerRef, err := docker.NewReference(reference.TagNameOnly(storageRef.DockerReference()))
if err != nil {
return errors.Wrapf(err, "error getting repository tags")
return errors.Wrapf(err, "internal error creating docker.Transport reference for %s", storageRef.DockerReference().String())
}
tags, err := docker.GetRepositoryTags(ctx, systemContext, dockerRef)
if err != nil {
Expand Down

0 comments on commit 6a60659

Please sign in to comment.