Cleanup:change latest to graph.DEFAULTTAG

Signed-off-by: Lei Jitang <leijitang@huawei.com>
Upstream-commit: 3c3968692d3024fde90637dbdfe56f08de100cdd
Component: engine
This commit is contained in:
Lei Jitang
2014-11-13 16:21:34 +08:00
parent 90c31c6725
commit 22cdb1d809

View File

@ -1235,7 +1235,7 @@ func (cli *DockerCli) CmdPull(args ...string) error {
)
taglessRemote, tag := parsers.ParseRepositoryTag(remote)
if tag == "" && !*allTags {
newRemote = taglessRemote + ":latest"
newRemote = taglessRemote + ":" + graph.DEFAULTTAG
}
if tag != "" && *allTags {
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)
// pull only the image tagged 'latest' if no tag was specified
if tag == "" {
tag = "latest"
tag = graph.DEFAULTTAG
}
v.Set("fromImage", repos)
v.Set("tag", tag)