Repository navigation
Commit 79a34a0
committed
fix(repo): decode quoted untracked paths with Unicode correctly
With `core.quotePath=false`, Git can emit raw UTF-8 characters alongside
C-style escapes in a quoted status path. `Repo.untracked_files` forced
that path through ASCII before unquoting it, raising `UnicodeEncodeError`
for a filename such as `café\x7f.txt`.
Reuse the existing `_unquote_path` byte decoder, as `Repo.ignored` already
does. The regression uses real Git output with both `core.quotePath`
settings and also checks the `Repo.is_dirty` caller.
Validation: the regression failed before the change. Related filename
tests passed (4 passed, 1 skipped, 2 subtests passed), and Ruff lint,
formatting, and `git diff --check` passed.1 parent 9658d0f commit 79a34a0
2 files changed
Lines changed: 13 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1141 | 1141 | | |
1142 | 1142 | | |
1143 | 1143 | | |
1144 | | - | |
1145 | | - | |
1146 | | - | |
| 1144 | + | |
1147 | 1145 | | |
1148 | 1146 | | |
1149 | 1147 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
905 | 905 | | |
906 | 906 | | |
907 | 907 | | |
| 908 | + | |
| 909 | + | |
| 910 | + | |
| 911 | + | |
| 912 | + | |
| 913 | + | |
| 914 | + | |
| 915 | + | |
| 916 | + | |
| 917 | + | |
| 918 | + | |
| 919 | + | |
908 | 920 | | |
909 | 921 | | |
910 | 922 | | |
| |||
0 commit comments