Browse Source

Merge pull request #9143 from coolljt0725/cleanup_defaulttag

Cleanup:change "latest" to graph.DEFAULTTAG
Alexandr Morozov 10 years ago
parent
commit
8f763a09d3
1 changed files with 2 additions and 2 deletions
  1. 2 2
      api/client/commands.go

+ 2 - 2
api/client/commands.go

@@ -1235,7 +1235,7 @@ func (cli *DockerCli) CmdPull(args ...string) error {
 	)
 	)
 	taglessRemote, tag := parsers.ParseRepositoryTag(remote)
 	taglessRemote, tag := parsers.ParseRepositoryTag(remote)
 	if tag == "" && !*allTags {
 	if tag == "" && !*allTags {
-		newRemote = taglessRemote + ":latest"
+		newRemote = taglessRemote + ":" + graph.DEFAULTTAG
 	}
 	}
 	if tag != "" && *allTags {
 	if tag != "" && *allTags {
 		return fmt.Errorf("tag can't be used with --all-tags/-a")
 		return fmt.Errorf("tag can't be used with --all-tags/-a")
@@ -2034,7 +2034,7 @@ func (cli *DockerCli) pullImageCustomOut(image string, out io.Writer) error {
 	repos, tag := parsers.ParseRepositoryTag(image)
 	repos, tag := parsers.ParseRepositoryTag(image)
 	// pull only the image tagged 'latest' if no tag was specified
 	// pull only the image tagged 'latest' if no tag was specified
 	if tag == "" {
 	if tag == "" {
-		tag = "latest"
+		tag = graph.DEFAULTTAG
 	}
 	}
 	v.Set("fromImage", repos)
 	v.Set("fromImage", repos)
 	v.Set("tag", tag)
 	v.Set("tag", tag)