From: Catalin Marinas Date: Mon, 8 Aug 2005 17:08:01 +0000 (+0100) Subject: Fix the 'import --name' option overriding X-Git-Tag: v0.14.3~714 X-Git-Url: https://git.distorted.org.uk/~mdw/stgit/commitdiff_plain/5185abc17c92cf16f985a5768654126af226c228 Fix the 'import --name' option overriding When the patch was read from a file, the --name option to import didn't override the default name. This patch fixes it. Signed-off-by: Catalin Marinas --- diff --git a/stgit/commands/imprt.py b/stgit/commands/imprt.py index 43bd2f1..2bf092c 100644 --- a/stgit/commands/imprt.py +++ b/stgit/commands/imprt.py @@ -145,10 +145,13 @@ def func(parser, options, args): if len(args) == 1: filename = args[0] - patch = os.path.basename(filename) - elif options.name: + else: filename = None + + if options.name: patch = options.name + elif filename: + patch = os.path.basename(filename) else: raise CmdException, 'Unkown patch name'