X-Git-Url: https://git.distorted.org.uk/~mdw/stgit/blobdiff_plain/1739d40a569e64da30df01500162f93d28ee6d19..1540d38a2c35d409784929ff6d91aedf6f60ebb7:/stgit/commands/uncommit.py diff --git a/stgit/commands/uncommit.py b/stgit/commands/uncommit.py index c22d3ea..ba3448f 100644 --- a/stgit/commands/uncommit.py +++ b/stgit/commands/uncommit.py @@ -26,7 +26,7 @@ from stgit.out import * from stgit import stack, git help = 'turn regular GIT commits into StGIT patches' -usage = """%prog [] | -n NUM []] | -t +usage = """%prog [] | -n NUM []] | -t [-x] 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 @@ -48,6 +48,7 @@ given commit should be uncommitted. Only commits with exactly one parent can be uncommitted; in other words, you can't uncommit a merge.""" +directory = DirectoryGotoToplevel() options = [make_option('-n', '--number', type = 'int', help = 'uncommit the specified number of commits'), make_option('-t', '--to', @@ -65,7 +66,7 @@ def func(parser, options, args): if len(args) != 0: parser.error('cannot specify patch name with --to') patch_nr = patchnames = None - to_commit = git_id(options.to) + to_commit = git_id(crt_series, options.to) elif options.number: if options.number <= 0: parser.error('invalid value passed to --number')