Add the --reset option to status
authorCatalin Marinas <catalin.marinas@gmail.com>
Tue, 4 Oct 2005 19:56:18 +0000 (20:56 +0100)
committerCatalin Marinas <catalin.marinas@gmail.com>
Tue, 4 Oct 2005 19:56:18 +0000 (20:56 +0100)
This option resets all the changes in the current tree (relative to HEAD).

Signed-off-by: Catalin Marinas <catalin.marinas@gmail.com>
stgit/commands/status.py

index c0b1a8e..4283df8 100644 (file)
@@ -57,11 +57,17 @@ options = [make_option('-m', '--modified',
                        action = 'store_true'),
            make_option('-x', '--noexclude',
                        help = 'do not exclude any files from listing',
+                       action = 'store_true'),
+           make_option('--reset',
+                       help = 'reset the current tree changes',
                        action = 'store_true')]
 
 
 def func(parser, options, args):
     """Show the tree status
     """
-    git.status(args, options.modified, options.new, options.deleted,
-               options.conflict, options.unknown, options.noexclude)
+    if options.reset:
+        git.reset()
+    else:
+        git.status(args, options.modified, options.new, options.deleted,
+                   options.conflict, options.unknown, options.noexclude)