X-Git-Url: https://git.distorted.org.uk/~mdw/stgit/blobdiff_plain/fcee87cf868f18a3d684c3ba71232574f92c7b11..681f805ef4688c7ea450f5e72a15dad818809734:/stgit/commands/files.py diff --git a/stgit/commands/files.py b/stgit/commands/files.py index 35be5db..b33bd2a 100644 --- a/stgit/commands/files.py +++ b/stgit/commands/files.py @@ -25,10 +25,21 @@ from stgit import stack, git help = 'show the files modified by a patch (or the current patch)' -usage = '%prog [options] []' +usage = """%prog [options] [] + +List the files modified by the given patch (defaulting to the current +one). Passing the '--stat' option shows the diff statistics for the +given patch. Note that this command doesn't show the files modified in +the working tree and not yet included in the patch by a 'refresh' +command. Use the 'diff' or 'status' commands for these files.""" options = [make_option('-s', '--stat', help = 'show the diff stat', + action = 'store_true'), + make_option('-b', '--branch', + help = 'use BRANCH instead of the default one'), + make_option('--bare', + help = 'bare file names (useful for scripting)', action = 'store_true')] @@ -42,10 +53,12 @@ def func(parser, options, args): else: parser.error('incorrect number of arguments') - rev1 = git_id('%s/bottom' % patch) - rev2 = git_id('%s/top' % patch) + rev1 = git_id('%s//bottom' % patch) + rev2 = git_id('%s//top' % patch) if options.stat: print git.diffstat(rev1 = rev1, rev2 = rev2) + elif options.bare: + print git.barefiles(rev1, rev2) else: print git.files(rev1, rev2)