I'm used to doing vi $(quilt files), which is impossible with stgit.
Add an option (-b/--base) to request the normal behaviour, but make it
non-default as the current output is useful.
Signed-off-by: Paolo 'Blaisorblade' Giarrusso <blaisorblade@yahoo.it>
action = 'store_true'),
make_option('-b', '--branch',
help = 'use BRANCH instead of the default one')]
+ action = 'store_true'),
+ make_option('--bare',
+ help = 'bare file names (useful for scripting)',
+ action = 'store_true')]
def func(parser, options, args):
if options.stat:
print git.diffstat(rev1 = rev1, rev2 = rev2)
+ elif options.bare:
+ print git.barefiles(rev1, rev2)
else:
print git.files(rev1, rev2)
return str.rstrip()
+def barefiles(rev1, rev2):
+ """Return the files modified between rev1 and rev2, without status info
+ """
+
+ str = ''
+ for line in _output_lines('git-diff-tree -r %s %s' % (rev1, rev2)):
+ str += '%s\n' % line.rstrip().split(' ',4)[-1].split('\t',1)[-1]
+
+ return str.rstrip()
+
def checkout(files = [], tree_id = None, force = False):
"""Check out the given or all files
"""