from stgit.commands.common import *
from stgit.utils import *
+from stgit.out import *
from stgit import stack, git
the working tree and not yet included in the patch by a 'refresh'
command. Use the 'diff' or 'status' commands for these files."""
+directory = DirectoryHasRepository()
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('-O', '--diff-opts',
+ help = 'options to pass to git-diff'),
make_option('--bare',
help = 'bare file names (useful for scripting)',
action = 'store_true')]
elif options.bare:
out.stdout_raw(git.barefiles(rev1, rev2) + '\n')
else:
- out.stdout_raw(git.files(rev1, rev2) + '\n')
+ if options.diff_opts:
+ diff_flags = options.diff_opts.split()
+ else:
+ diff_flags = []
+
+ out.stdout_raw(git.files(rev1, rev2, diff_flags = diff_flags) + '\n')