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')]
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)
+ out.stdout_raw(git.diffstat(rev1 = rev1, rev2 = rev2) + '\n')
+ elif options.bare:
+ out.stdout_raw(git.barefiles(rev1, rev2) + '\n')
else:
- print git.files(rev1, rev2)
+ out.stdout_raw(git.files(rev1, rev2) + '\n')