fix: checkout now refuses on any dirty tracked file
The old require_clean_workdir only blocked files that the target branch would overwrite (different object_id between HEAD and target). Files that were modified locally but identical on both branches silently bled through — exactly the bug that left 80+ modified files on branches the user never touched.
Fix: remove the permissive target_manifest narrowing path from require_clean_workdir. Any dirty tracked file now blocks checkout; users must commit, shelf, --autoshelf, or --force explicitly.
Fix --force on branch switch: pass current_snapshot_id=None so _checkout_snapshot diffs empty→target, restoring ALL target files and discarding local modifications (consistent with what --force implies).
Tests: TestDirtyWorkdirBleedThrough (9 tests) — red before, green after. Delete TestSwitchWithNonConflictingChanges tests that asserted the bug.
0 comments
muse hub commit comment sha256:3d2ec5a1f34b82c1c61ce7ed91de1c2b8ae50a3239a683248e10e7e8f5f00737 --body "your comment"
No comments yet. Be the first to start the discussion.