diff_str = diff(files, rev1, rev2)
if diff_str:
try:
- GRun('git-apply', *index_opt).raw_input(diff_str).no_output()
+ GRun('git-apply', *index_opt).raw_input(
+ diff_str).discard_stderr().no_output()
except GitRunException:
return False
else:
return ''
+# TODO: take another parameter representing a diff string as we
+# usually invoke git.diff() form the calling functions
def diffstat(files = None, rev1 = 'HEAD', rev2 = None):
"""Return the diffstat between rev1 and rev2."""
- return GRun('git-apply', '--stat'
+ return GRun('git-apply', '--stat', '--summary'
).raw_input(diff(files, rev1, rev2)).raw_output()
def files(rev1, rev2, diff_flags = []):
if os.path.exists(d):
return os.listdir(d)
else:
- return None
+ return []
def remotes_list():
"""Return the list of remotes in the repository