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.
3.9 KiB
3.9 KiB