Generate unique patch names
[stgit] / stgit / commands / uncommit.py
index 45a2087..9798f19 100644 (file)
@@ -97,9 +97,8 @@ def func(parser, options, args):
         if patchnames:
             patchname = patchnames[n]
         else:
-            patchname = make_patch_name(commit.get_log())
-        if not patchname:
-            raise CmdException, 'Unknown patch name for commit %s' % commit_id
+            patchname = make_patch_name(commit.get_log(),
+                                        crt_series.patch_exists)
 
         crt_series.new_patch(patchname,
                              can_edit = False, before_existing = True,