Add missing switch to "stg uncommit" usage line
[stgit] / stgit / commands / uncommit.py
index c22d3ea..ba3448f 100644 (file)
@@ -26,7 +26,7 @@ from stgit.out import *
 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
@@ -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')