X-Git-Url: https://git.distorted.org.uk/~mdw/stgit/blobdiff_plain/fcee87cf868f18a3d684c3ba71232574f92c7b11..681f805ef4688c7ea450f5e72a15dad818809734:/stgit/commands/status.py diff --git a/stgit/commands/status.py b/stgit/commands/status.py index 65bffac..b8f0623 100644 --- a/stgit/commands/status.py +++ b/stgit/commands/status.py @@ -25,7 +25,20 @@ from stgit import stack, git help = 'show the tree status' -usage = '%prog [options] []' +usage = """%prog [options] [] + +Show the status of the whole working copy or the given files. The +command also shows the files in the current directory which are not +under revision control. The files are prefixed as follows: + + M - locally modified + N - newly added to the repository + D - deleted from the repository + C - conflict + ? - unknown + +A 'refresh' command clears the status of the modified, new and deleted +files.""" options = [make_option('-m', '--modified', help = 'show modified files only', @@ -41,11 +54,26 @@ options = [make_option('-m', '--modified', action = 'store_true'), make_option('-u', '--unknown', help = 'show unknown files only', + 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) + if options.reset: + if args: + for f in args: + resolved(f) + git.reset(args) + else: + resolved_all() + git.reset() + else: + git.status(args, options.modified, options.new, options.deleted, + options.conflict, options.unknown, options.noexclude)