feat: implement muse switch — focused branch switcher
Cleaner alternative to checkout for branch operations. Delegates to checkout's internal machinery; adds: -c (create), -C (force-create / reset existing branch to HEAD), 'switch -' (previous branch via .muse/PREV_BRANCH), --discard-changes, --detach, --merge, --autostash, --dry-run, --json. 37 TDD tests: flag parsing, PREV_BRANCH helpers, all switch modes, security, stress.
sha256:6a15592f734c7b6517f7d77a04141c438f4f200f05973e4327912f04f65ad299
sha
+78
~109
symbols
sha256:a54049666c63009120a14110aea87ea94bbb169ea48e5c11e5764629f6dd32dc
snapshot
+78
symbols added
~109
symbols modified
0
dead code introduced
Semantic Changes
187 symbols
+
test_read_prev_branch_missing_returns_none
function
function test_read_prev_branch_missing_returns_none L128–133
+
test_switch_C_creates_when_not_exists
function
function test_switch_C_creates_when_not_exists L209–212
+
test_switch_C_overwrites_existing_branch
function
function test_switch_C_overwrites_existing_branch L215–221
+
test_switch_ansi_in_branch_name_rejected
function
function test_switch_ansi_in_branch_name_rejected L359–361
+
test_switch_c_fails_if_branch_exists
function
function test_switch_c_fails_if_branch_exists L192–194
+
test_switch_c_points_to_current_head
function
function test_switch_c_points_to_current_head L197–201
+
test_switch_dash_returns_to_previous
function
function test_switch_dash_returns_to_previous L229–234
+
test_switch_dash_without_history_exits_nonzero
function
function test_switch_dash_without_history_exits_nonzero L237–240
+
test_switch_dirty_tree_blocked_without_flag
function
function test_switch_dirty_tree_blocked_without_flag L264–268
+
test_switch_discard_changes_allows_dirty_switch
function
function test_switch_discard_changes_allows_dirty_switch L271–275
+
test_switch_dry_run_c_does_not_create_branch
function
function test_switch_dry_run_c_does_not_create_branch L294–296
+
test_switch_dry_run_does_not_change_branch
function
function test_switch_dry_run_does_not_change_branch L283–286
+
test_switch_dry_run_no_prev_branch_written
function
function test_switch_dry_run_no_prev_branch_written L289–291
+
test_switch_nonexistent_branch_exits_nonzero
function
function test_switch_nonexistent_branch_exits_nonzero L175–177
+
test_switch_writes_prev_branch_on_switch
function
function test_switch_writes_prev_branch_on_switch L243–247
~
age_cmd
~
annotate
~
archive
~
auth
~
bisect
~
blame
~
branch
~
breakage
~
bundle
~
cat
~
check
~
checkout
~
clean
~
clone
~
clones
~
codemap
~
commit
~
compare
~
contract
~
coord_gc
~
coupling
~
coverage
~
dag_cmd
~
dead
~
deps
~
describe
~
diff
~
docs_cmd
~
domains
~
entangle
~
fetch
~
forecast
~
gc
~
gravity
~
grep
~
harmony
~
hotspots
~
hub
~
impact
~
init
~
intent
~
lineage
~
log
~
merge
~
migrate
~
mv
~
patch
~
predict
~
pull
~
push
~
query
~
rebase
~
reflog
~
remote
~
rename
~
rerere
~
reserve
~
reset
~
revert
~
rm
~
shard
~
shortlog
~
show
~
stable
~
stash
~
status
~
symbols
~
tag
~
test_cmd
~
trust
~
type_cmd
~
velocity
~
verify
~
worktree
~
main
0 comments
To add a comment, use the Muse CLI:
muse hub commit comment sha256:6a15592f734c7b6517f7d77a04141c438f4f200f05973e4327912f04f65ad299 --body "your comment"
No comments yet. Be the first to start the discussion.