From: Catalin Marinas Date: Mon, 24 Mar 2008 18:42:09 +0000 (+0000) Subject: Allow picking of one commit id X-Git-Tag: v0.14.2~9 X-Git-Url: https://www.chiark.greenend.org.uk/ucgi/~mdw/git/stgit/commitdiff_plain/1ca35edb6023b851ed203b37d067af92277cef70 Allow picking of one commit id This was broken by a previous patch. Signed-off-by: Catalin Marinas --- diff --git a/stgit/commands/pick.py b/stgit/commands/pick.py index 44cf984..f9ee7c2 100644 --- a/stgit/commands/pick.py +++ b/stgit/commands/pick.py @@ -169,12 +169,12 @@ def func(parser, options, args): patches = parse_patches(args, applied + unapplied, len(applied)) commit_id = None except CmdException: - if len(args) >= 1: + if len(args) > 1: raise # no patches found, try a commit id commit_id = git_id(remote_series, args[0]) - if len(patches) > 1: + if not commit_id and len(patches) > 1: if options.name: raise CmdException, '--name can only be specified with one patch' if options.parent: