| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -365,7 +365,8 @@ def _index_from_raw_format(cls, repo, stream): | |||
| 365 | 365 | if not line.startswith(":"): | |
| 366 | 366 | continue | |
| 367 | 367 | # END its not a valid diff line | |
| 368 | - old_mode, new_mode, a_blob_id, b_blob_id, change_type, path = line[1:].split(None, 5) | ||
| 368 | + meta, _, path = line[1:].partition('\t') | ||
| 369 | + old_mode, new_mode, a_blob_id, b_blob_id, change_type = meta.split(None, 4) | ||
| 369 | 370 | path = path.strip() | |
| 370 | 371 | a_path = path | |
| 371 | 372 | b_path = path | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -0,0 +1 @@ | |||
| 1 | + :100644 000000 e69de29bb2d1d6434b8b29ae775ad8c2e48c5391 0000000000000000000000000000000000000000 D | ||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -122,6 +122,12 @@ def test_diff_index(self): | |||
| 122 | 122 | dr = res[3] | |
| 123 | 123 | assert dr.diff.endswith(b"+Binary files a/rps and b/rps differ\n") | |
| 124 | 124 | ||
| 125 | + def test_diff_index_raw_format(self): | ||
| 126 | + output = StringProcessAdapter(fixture('diff_index_raw')) | ||
| 127 | + res = Diff._index_from_raw_format(None, output.stdout) | ||
| 128 | + assert res[0].deleted_file | ||
| 129 | + assert res[0].b_path == '' | ||
| 130 | + | ||
| 125 | 131 | def test_diff_patch_format(self): | |
| 126 | 132 | # test all of the 'old' format diffs for completness - it should at least | |
| 127 | 133 | # be able to deal with it | |
| Back | FazBrowse Home | New Git URL |
0 commit comments