From a0b229071394e6534808f16c4570ed8fd9ff3a1c Mon Sep 17 00:00:00 2001 From: Victor Vieux Date: Fri, 27 Jun 2014 20:22:18 +0000 Subject: [PATCH] remove deprecated syntax for docker commit Docker-DCO-1.1-Signed-off-by: Victor Vieux (github: vieux) --- api/client/commands.go | 13 ++++--------- 1 file changed, 4 insertions(+), 9 deletions(-) diff --git a/api/client/commands.go b/api/client/commands.go index 61ef426387..76d079fc30 100644 --- a/api/client/commands.go +++ b/api/client/commands.go @@ -1546,17 +1546,12 @@ func (cli *DockerCli) CmdCommit(args ...string) error { return nil } - var name, repository, tag string - - if cmd.NArg() == 3 { - fmt.Fprintf(cli.err, "[DEPRECATED] The format 'CONTAINER [REPOSITORY [TAG]]' as been deprecated. Please use CONTAINER [REPOSITORY[:TAG]]\n") - name, repository, tag = cmd.Arg(0), cmd.Arg(1), cmd.Arg(2) - } else { - name = cmd.Arg(0) + var ( + name = cmd.Arg(0) repository, tag = utils.ParseRepositoryTag(cmd.Arg(1)) - } + ) - if name == "" { + if name == "" || len(cmd.Args()) > 2 { cmd.Usage() return nil }