From 1ca35edb6023b851ed203b37d067af92277cef70 Mon Sep 17 00:00:00 2001 Message-Id: <1ca35edb6023b851ed203b37d067af92277cef70.1746821188.git.mdw@distorted.org.uk> From: Mark Wooding Date: Mon, 24 Mar 2008 18:42:09 +0000 Subject: [PATCH] Allow picking of one commit id Organization: Straylight/Edgeware From: Catalin Marinas This was broken by a previous patch. Signed-off-by: Catalin Marinas --- stgit/commands/pick.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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: -- [mdw]