summaryrefslogtreecommitdiff
path: root/git/diff.py
diff options
context:
space:
mode:
Diffstat (limited to 'git/diff.py')
-rw-r--r--git/diff.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/git/diff.py b/git/diff.py
index 0fc30b9e..17ef15af 100644
--- a/git/diff.py
+++ b/git/diff.py
@@ -108,6 +108,7 @@ class Diffable(object):
args.append("-p")
else:
args.append("--raw")
+ args.append("-z")
# in any way, assure we don't see colored output,
# fixes https://github.com/gitpython-developers/GitPython/issues/172
@@ -483,7 +484,7 @@ class Diff(object):
if not line.startswith(":"):
return
- meta, _, path = line[1:].partition('\t')
+ meta, _, path = line[1:].partition('\x00')
old_mode, new_mode, a_blob_id, b_blob_id, _change_type = meta.split(None, 4)
# Change type can be R100
# R: status letter