Skip to content

Commit

Permalink
Revert "Use NUL character to extract meta and path from git diff"
Browse files Browse the repository at this point in the history
This reverts commit 01f0988.
  • Loading branch information
Byron committed Jan 7, 2022
1 parent cd8b9b2 commit 3ef81e1
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions git/diff.py
Original file line number Diff line number Diff line change
Expand Up @@ -509,9 +509,9 @@ def _index_from_patch_format(cls, repo: 'Repo', proc: Union['Popen', 'Git.AutoIn
def _handle_diff_line(lines_bytes: bytes, repo: 'Repo', index: DiffIndex) -> None:
lines = lines_bytes.decode(defenc)

it = iter(lines.split('\x00'))
for meta, path in zip(it, it):
meta = meta[1:]
for line in lines.split(':')[1:]:
meta, _, path = line.partition('\x00')
path = path.rstrip('\x00')
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)
Expand Down

0 comments on commit 3ef81e1

Please sign in to comment.