M4.9: Git stash (stash, list, apply, pop, drop) with clear refusals

- crates/vcs: stash.rs (append) with Repo::stash, stash_list, stash_apply
  and stash_drop; refusals decided structurally (no commit, nothing to
  stash, unmerged files, conflicts after apply, missing or changed entry)
  plus hints for overwritten and untracked files. Works around git leaving
  untracked files behind under --literal-pathspecs. Repo::lock is
  pub(crate), as for M4.8.
- engine: git.stash, git.stashList, git.stashApply {index, pop, hash?},
  git.stashDrop through the M4.6 hook; gitChanged after changes.
- ui: stash dialog (vcs.stash, vcs.showStashes; Git menu, no shortcuts),
  two buttons in the Changes window, dirty buffers saved first, drop asks.
- Tests: vcs integration and property tests, engine test, 13 Vitest tests.
- Docs: architecture section, G8, tooling checklist, roadmap, Git row
  evidence (score left to the PM).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
danny 2026-10-29 18:49:54 +01:00
parent 65907d925a
commit e09ef8b8c0
23 changed files with 2681 additions and 13 deletions

View file

@ -293,6 +293,8 @@ describe("AppMenu", () => {
"vcs.resolveConflicts",
"vcs.showDiff",
"vcs.showHistory",
"vcs.stash",
"vcs.showStashes",
"app.about",
]);
const close = document.querySelector("[data-command='buffer.close']");