X-Git-Url: https://git.distorted.org.uk/~mdw/stgit/blobdiff_plain/860d288db5f555a00a27a05bffd9b19fda154ccb..bec7726668d737f8bc4242372d9fb542339654e0:/stgit/commands/uncommit.py diff --git a/stgit/commands/uncommit.py b/stgit/commands/uncommit.py index 45a2087..0ee1585 100644 --- a/stgit/commands/uncommit.py +++ b/stgit/commands/uncommit.py @@ -25,7 +25,7 @@ from stgit.utils import * from stgit import stack, git help = 'turn regular GIT commits into StGIT patches' -usage = """%prog [options] [ [ ... ]] +usage = """%prog [ [ ... ] | -n []] Take one or more git commits at the base of the current stack and turn them into StGIT patches. The new patches are created as applied patches @@ -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,