| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
1 parent bec6157 commit db392ae
2 files changed
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -570,7 +570,10 @@ def _index_from_patch_format(cls, repo: "Repo", proc: Union["Popen", "Git.AutoIn | |||
| 570 | 570 | def _handle_diff_line(lines_bytes: bytes, repo: "Repo", index: DiffIndex) -> None: | |
| 571 | 571 | lines = lines_bytes.decode(defenc) | |
| 572 | 572 | ||
| 573 | - for line in lines.split(":")[1:]: | ||
| 573 | + # Discard everything before the first colon, and the colon itself. | ||
| 574 | + _, _, lines = lines.partition(":") | ||
| 575 | + | ||
| 576 | + for line in lines.split("\x00:"): | ||
| 574 | 577 | meta, _, path = line.partition("\x00") | |
| 575 | 578 | path = path.rstrip("\x00") | |
| 576 | 579 | a_blob_id: Optional[str] | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -236,7 +236,6 @@ def test_diff_index_raw_format(self): | |||
| 236 | 236 | res[0].b_path, | |
| 237 | 237 | ) | |
| 238 | 238 | ||
| 239 | - @unittest.skip("This currently fails and would need someone to improve diff parsing") | ||
| 240 | 239 | def test_diff_file_with_colon(self): | |
| 241 | 240 | output = fixture("diff_file_with_colon") | |
| 242 | 241 | res = [] | |
| Back | FazBrowse Home | New Git URL |
0 commit comments