Commit Graph

1 Commits

Author SHA1 Message Date
Tom Boucher
0f77681df4 fix(commit): skip staging deletions for missing files when --files is explicit (#2014) (#2025)
When gsd-tools commit is invoked with --files and one of the listed files
does not exist on disk, the previous code called git rm --cached which
staged and committed a deletion. This silently removed tracked planning
files (STATE.md, ROADMAP.md) from the repository whenever they were
temporarily absent on disk.

Fix: when explicit --files are provided, skip files that do not exist
rather than staging their deletion. Only the default (.planning/ staging
path) retains the git rm --cached behavior so genuinely removed planning
files are not left dangling in the index.

Adds regression tests verifying that missing files in an explicit --files
list are never staged as deletions.
2026-04-10 10:56:09 -04:00