diff options
Diffstat (limited to 'git/diff.py')
-rw-r--r-- | git/diff.py | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/git/diff.py b/git/diff.py index cea66d7e..c8c57685 100644 --- a/git/diff.py +++ b/git/diff.py @@ -509,9 +509,9 @@ class Diff(object): def _handle_diff_line(lines_bytes: bytes, repo: 'Repo', index: DiffIndex) -> None: lines = lines_bytes.decode(defenc) - for line in lines.split(':')[1:]: - meta, _, path = line.partition('\x00') - path = path.rstrip('\x00') + it = iter(lines.split('\x00')) + for meta, path in zip(it, it): + meta = meta[1:] a_blob_id: Optional[str] b_blob_id: Optional[str] old_mode, new_mode, a_blob_id, b_blob_id, _change_type = meta.split(None, 4) |