chiark / gitweb /
Fix the --name option for the pick command
[stgit] / stgit / commands / pick.py
index c425945124c22be806e28c3fd4ff8d0a198fc1c9..3c52a4918e88c8df4b24ef572a9555309c0a0ae2 100644 (file)
@@ -59,10 +59,10 @@ def func(parser, options, args):
             raise CmdException, 'No patches applied'
     else:
         patch_branch = commit_str.split('@')
-        if len(patch_branch) == 2:
-            patch = patch_branch[0]
-        elif options.name:
+        if options.name:
             patch = options.name
+        elif len(patch_branch) == 2:
+            patch = patch_branch[0]
         else:
             raise CmdException, 'Unkown patch name'