from stgit import stack, git
help = 'turn regular GIT commits into StGIT patches'
-usage = """%prog [<patchnames>] | -n NUM [<prefix>]] | -t <committish>
+usage = """%prog [<patchnames>] | -n NUM [<prefix>]] | -t <committish> [-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
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',
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')