Repository navigation
Commit 3e9611b
committed
fix(stats): preserve whitespace in filenames
Commit.stats strips leading and trailing whitespace from filenames after
splitting the diff output into records. This merges distinct paths such
as `name`, ` name`, and `name `, overwrites their per-file statistics, and
turns an all-space filename into an empty key.
Keep the filename field intact. Add an integration regression covering
root commits, later modifications, empty commits, and deletions. Store
blobs directly to avoid relying on trailing-space worktree filenames.
The regression fails before this change and passes afterward. On Linux
with Python 3.12, the full suite passes: 1690 passed, 89 skipped, 1 xfailed,
and 64 subtests passed. Pre-commit, mypy, and basedpyright also pass.
Prepared by OpenAI Codex (dot); human review is pending.1 parent 804bc80 commit 3e9611b
2 files changed
Lines changed: 32 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1107 | 1107 | | |
1108 | 1108 | | |
1109 | 1109 | | |
1110 | | - | |
| 1110 | + | |
1111 | 1111 | | |
1112 | 1112 | | |
1113 | 1113 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
17 | 17 | | |
18 | 18 | | |
19 | 19 | | |
| 20 | + | |
20 | 21 | | |
21 | 22 | | |
22 | 23 | | |
| |||
166 | 167 | | |
167 | 168 | | |
168 | 169 | | |
| 170 | + | |
| 171 | + | |
| 172 | + | |
| 173 | + | |
| 174 | + | |
| 175 | + | |
| 176 | + | |
| 177 | + | |
| 178 | + | |
| 179 | + | |
| 180 | + | |
| 181 | + | |
| 182 | + | |
| 183 | + | |
| 184 | + | |
| 185 | + | |
| 186 | + | |
| 187 | + | |
| 188 | + | |
| 189 | + | |
| 190 | + | |
| 191 | + | |
| 192 | + | |
| 193 | + | |
| 194 | + | |
| 195 | + | |
| 196 | + | |
| 197 | + | |
| 198 | + | |
| 199 | + | |
169 | 200 | | |
170 | 201 | | |
171 | 202 | | |
| |||
0 commit comments