fix: checkout -b with dirty workdir no longer blocked
checkout -b creates a new branch at the current HEAD — no file content changes, so dirty tracked files cannot be overwritten. The dirty-workdir guard was firing unconditionally before the create vs. switch decision, forcing an unnecessary stash/unstash cycle every time a feature branch was started with uncommitted WIP.
Fix: skip require_clean_workdir when create=True. The guard still fires for switching to an existing branch whose snapshot differs from workdir.
Regression test: test_create_with_dirty_workdir_succeeds verifies exit 0, correct branch switch, and dirty file preservation.
sha256:0fdc2b726ba8033af722e14da92867409f2d98d28db86ece8b14d4154219c03a
sha
sha256:633b4d4a35f278b57e32f03db8b46953c8c585ada289ca30c1213768df866c0b
snapshot
← Older
Oldest on task/fix-checkout-create-dirty-tree
All commits
Newer →
Latest on task/fix-checkout-create-dirty-tree
0 comments
To add a comment, use the Muse CLI:
muse hub commit comment sha256:0fdc2b726ba8033af722e14da92867409f2d98d28db86ece8b14d4154219c03a --body "your comment"
No comments yet. Be the first to start the discussion.