fix(merge,commit): preserve staged files across merge --abort; sync working tree after commit
Bug 1 (merge.py _run_abort): apply_manifest(HEAD) deleted staged-but-not-committed files from disk because they are absent from HEAD's manifest. Fix: after restoring the pre-merge manifest, re-apply each staged entry from the object store so staged work survives the abort.
Bug 2 (commit.py): write_object_from_path is idempotent — if an object is already in the store (from a prior muse code add), it skips the write. When the disk file was deleted or reverted (e.g. by merge --abort) the committed manifest included the file but the working tree did not. Fix: call apply_manifest(root, manifest) after write_branch_ref so the working tree always matches HEAD after every commit.
TDD: TestMergeAbortPreservesStagedFiles (2), TestCommitRestoresFilesToDisk (2) — all GREEN.
0 comments
muse hub commit comment sha256:2488199781a82a482b83e3b60bab61b563e6f413574256dc831cb59c9f9efac9 --body "your comment"
No comments yet. Be the first to start the discussion.