fix: muse code add skipped unchanged-vs-HEAD check, staging all files
When the stage index was empty (first run of muse code add), the only skip guard compared the newly-computed hash against the existing stage entry. That check was vacuously false for every file, so every file in the working tree was staged — even ones whose content was byte-for-byte identical to the last committed snapshot.
Fix: after hashing a file, compare its object_id against head_manifest. If they match the file has not changed; skip without staging it. This makes muse code add . agree with muse status: only genuinely-changed files appear in the stage.
Regression test: test_add_dot_does_not_stage_unchanged_files verifies that only the modified file is staged when two files exist and only one is edited between commits.
No comments yet. Be the first to start the discussion.