From: Catalin Marinas Date: Tue, 4 Oct 2005 19:56:18 +0000 (+0100) Subject: Add the --reset option to status X-Git-Tag: v0.14.3~639 X-Git-Url: https://git.distorted.org.uk/~mdw/stgit/commitdiff_plain/94227db3c3ae40343c1cbc41b5617389eb7d7c40 Add the --reset option to status This option resets all the changes in the current tree (relative to HEAD). Signed-off-by: Catalin Marinas --- diff --git a/stgit/commands/status.py b/stgit/commands/status.py index c0b1a8e..4283df8 100644 --- a/stgit/commands/status.py +++ b/stgit/commands/status.py @@ -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)