The patch adds the '--binary' option to the git-diff-tree and git-diff-index
commands. The git-apply no longer needs this flag as it is set by default.
Signed-off-by: Catalin Marinas <catalin.marinas@gmail.com>
if errors:
raise GitException, 'GIT index merging failed (possible conflicts)'
if errors:
raise GitException, 'GIT index merging failed (possible conflicts)'
-def diff(files = None, rev1 = 'HEAD', rev2 = None, diff_flags = []):
+def diff(files = None, rev1 = 'HEAD', rev2 = None, diff_flags = [],
+ binary = True):
"""Show the diff between rev1 and rev2
"""
if not files:
files = []
"""Show the diff between rev1 and rev2
"""
if not files:
files = []
+ if binary and '--binary' not in diff_flags:
+ diff_flags = diff_flags + ['--binary']
if rev1 and rev2:
return GRun('diff-tree', '-p',
if rev1 and rev2:
return GRun('diff-tree', '-p',