Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork941
Commitdb392ae
committed
Fix bug where colons in paths raise a
This commit introduces a potential fix for#1490 and#1483, in which an`invalid literal for int() with base 10: 'n'` exception was raisedwithin a diff operation. Within `_handle_diff_line()`, we split theoutput of `git diff-tree` on colons (`:` characters), under theassumption that there are no colons within the paths of the files beingdiffed. On POSIX systems this is not a valid assumption. The fix is tosplit on `\x00:`, since a null character always precedes the colons weactually need to split on.A test already existed for this case (`test_diff_file_with_colon()`),but it was marked as skipped.* Split on `\x00:` instead of `:` in `_handle_diff_line()`.* Unskip `test_diff_file_with_colon()`.ValueError
ondiff()
calls.1 parentbec6157 commitdb392ae
2 files changed
+4
-2
lines changedLines changed: 4 additions & 1 deletion
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
570 | 570 |
| |
571 | 571 |
| |
572 | 572 |
| |
573 |
| - | |
| 573 | + | |
| 574 | + | |
| 575 | + | |
| 576 | + | |
574 | 577 |
| |
575 | 578 |
| |
576 | 579 |
| |
|
Lines changed: 0 additions & 1 deletion
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
236 | 236 |
| |
237 | 237 |
| |
238 | 238 |
| |
239 |
| - | |
240 | 239 |
| |
241 | 240 |
| |
242 | 241 |
| |
|
0 commit comments
Comments
(0)