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]>
  • Loading branch information
mtrmac committed Feb 23, 2019
1 parent cfc1aa5 commit a2eb352
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 a2eb352

Please sign in to comment.