Add restore (x): make a repository exactly what git records

Restores the selection and all submodules below it recursively, asking
only if work would be lost. May clone/fetch missing objects (D23).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
2026-10-22 12:38:29 +02:00
co-authored by Claude Opus 5.5
parent a328d3cc3a
commit 7980d3356a
16 changed files with 1260 additions and 118 deletions
+3 -3
View File
@@ -33,10 +33,10 @@ Installs `submarine` and the alias `sub` (linux/macOS, amd64/arm64) to
through a git provider (`internal/submodule/git`): `submarine [dir]`. It
fetches only when asked (`f`) and follows changes made in other shells. `submarine --mock` shows
the built-in mock data (`internal/submodule/mock`). `!` shows only
submodules with problems. It is read-only so far; the first write actions
are [drafted](actions.md).
submodules with problems. `x` restores the selection
([actions.md](actions.md)); stage pin is drafted there.
Next steps, roughly in order:
1. Write actions: restore and stage pin, see [actions.md](actions.md).
1. Stage pin, see [actions.md](actions.md). (Restore is done.)
2. (done) "Problems only" (`!`) view, reusing the tree's filter.