fix(#2112): scope commit to --files pathspec, not entire index (#2148)

* fix(2112): scope commit to --files pathspec, not entire index

cmdCommit/cmdCommitToSubrepo/cmdPrSubrepo staged exactly the files
named in --files but then ran a bare 'git commit' with no pathspec,
absorbing anything else in the index into a commit whose message
described only the named files (#2112).

Fix: append '-- ...stagedPaths' to the commit args when the caller
declared a scope. Three guards are load-bearing:
- stagedPaths (not filesToStage) excludes skipped missing files (#2014)
- explicitFiles gate keeps the default .planning/ path byte-identical
- MERGE_HEAD check via 'git rev-parse' falls back to bare commit during merge
- --amend is left without pathspec (different operation)

cmdPrSubrepo pathspec uses changedFiles (old+new for renames) so the
full rename is captured atomically.

Also fixes workflow markdown in spec-phase.md and add-tests.md.

All-files-missing now short-circuits to nothing_to_commit instead of
absorbing the entire index under a message describing files that
were not committed.

* docs(changeset): backfill PR number (#2148)

* test: update golden-install-parity fixtures for workflow markdown changes (#2112)

* test: update golden fixtures + workflow baselines for #2112 changes

- claude-local.json golden fixture (now generated via gen script)
- workflow-size-baseline.json (add-tests.md +16, spec-phase.md +42 bytes)
- Extended gen-golden-install-parity-zcode.cjs to also regenerate the
  claude local-layout fixture
This commit is contained in:
Tom Boucher
2026-07-13 00:21:46 -04:00
committed by GitHub
parent 481f00e38a
commit 4bb846b67a
25 changed files with 285 additions and 47 deletions

View File

@@ -269,7 +269,7 @@
"gsd-core/workflows/_runtime-launcher.snippet.sh": "bf2dd5d1debd5335",
"gsd-core/workflows/add-backlog.md": "08289088a88d410f",
"gsd-core/workflows/add-phase.md": "5154a5fb3e0d4370",
"gsd-core/workflows/add-tests.md": "81d0a836878e1a10",
"gsd-core/workflows/add-tests.md": "b4deb88c74d491c7",
"gsd-core/workflows/add-todo.md": "72fcef9fd0cafda5",
"gsd-core/workflows/ai-integration-phase.md": "90e5f97018715b18",
"gsd-core/workflows/analyze-dependencies.md": "77aff48f97fa6f1c",
@@ -367,7 +367,7 @@
"gsd-core/workflows/sketch-wrap-up.md": "681800323681c5c6",
"gsd-core/workflows/sketch.md": "fcb7af914159ef7b",
"gsd-core/workflows/smart-entry.md": "2a253fe437496eea",
"gsd-core/workflows/spec-phase.md": "cb6cbe6eac816b0a",
"gsd-core/workflows/spec-phase.md": "5c4a3001095ca722",
"gsd-core/workflows/spike-wrap-up.md": "30a73aa19a1db271",
"gsd-core/workflows/spike.md": "f8b07d411473560a",
"gsd-core/workflows/stats.md": "846cd2808461ccdc",