Repository navigation
Commit af18969
committed
fix(checkpoints): restore exactly the requested path when names contain glob characters
The ls-tree existence lookup matches literally, but the checkout
pathspec did not: a filename like [a].ts is a character class as a
plain pathspec, so checkout restored a.ts instead of (and in addition
to) the requested file, breaking the single-file restore contract.
The checkout pathspec now uses the same :(literal) magic as the
lookups. Regression test checkpoints [a].ts alongside a.ts, modifies
both, and pins that restoring [a].ts leaves a.ts untouched (negative
control verified: the plain pathspec reddens it).
Review feedback on PR 1410; owned by PR 1410's service and byte-copied
to the sibling unit carrying the identical file.1 parent 4dcb8d9 commit af18969
2 files changed
Lines changed: 27 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
510 | 510 | | |
511 | 511 | | |
512 | 512 | | |
513 | | - | |
| 513 | + | |
| 514 | + | |
| 515 | + | |
| 516 | + | |
| 517 | + | |
514 | 518 | | |
515 | 519 | | |
516 | 520 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
280 | 280 | | |
281 | 281 | | |
282 | 282 | | |
| 283 | + | |
| 284 | + | |
| 285 | + | |
| 286 | + | |
| 287 | + | |
| 288 | + | |
| 289 | + | |
| 290 | + | |
| 291 | + | |
| 292 | + | |
| 293 | + | |
| 294 | + | |
| 295 | + | |
| 296 | + | |
| 297 | + | |
| 298 | + | |
| 299 | + | |
| 300 | + | |
| 301 | + | |
| 302 | + | |
| 303 | + | |
| 304 | + | |
283 | 305 | | |
284 | 306 | | |
285 | 307 | | |
| |||
0 commit comments