- A selection that resolves to no entries (e.g. ":(exclude)*") is refused
before the pre-rollback snapshot. Checkout with an empty pathspec file
switches the store's HEAD instead of restoring nothing.
- Remove the nested repository with utils.rmtree_readonly so the
deleted-repo test runs on Git for Windows (read-only loose objects).
- Check out the entries resolved during inspection as literal paths,
instead of re-evaluating the pathspec after the pre-rollback snapshot
restages the index (attribute pathspecs could select an uncaptured
gitlink the inspection never saw).
- Put a multiline reason on one line before appending the nested-repo
note; listings read %s, which stops at the first blank line.
- Gate host-specific test rows with platforms() and decode raw-byte
filenames inside the test, so the file collects on Windows, passes on
macOS and is selected by the OS lanes.
A nested repository is stored as a gitlink, so its files are not in the
checkpoint. Say so when the checkpoint is taken: its message gains
"[nested git repos not captured: <paths>]", which every /rollback listing
(CLI, gateway, TUI, Desktop) already shows. The gitlink parse is shared
with the rollback guard.
rollback.list sent the TUI an always-empty message (it read a "message"
key the manager calls "reason"), so TUI and Desktop listings never showed
what a checkpoint was; map it from reason.
Co-authored-by: FroRaut <79215537+Froraut@users.noreply.github.com>
A one-component gitlink cannot catch separator or component-splitting
mistakes in the scoped restore guard. Pin refusal for the exact gitlink,
its ancestors and descendants in every spelling (including Windows
separators on Windows), and unrelated recovery beside it.
Co-authored-by: FroRaut <79215537+Froraut@users.noreply.github.com>
The scoped restore guard resolved the requested path through the live
filesystem, so a captured file later replaced by a symlink into a nested
repository was refused even though the checkpoint holds its bytes.
Normalize the selection lexically; resolved-path confinement stays in
_validate_file_path. A recorded gitlink replaced by an unrelated symlink
is still refused.
Resolve selective restores against a disposable index before any checkpoint mutation, preserving unrelated-file recovery and refusing uncaptured gitlinks. Keep NUL-delimited filenames lossless, including surrogateescaped POSIX bytes. Add real-Git regression coverage and document the capture limitation.
Fixes#127073
Salvages #127077
Co-authored-by: Yuan Li <dskwelmcy@163.com>