refactor
BREAKING
store
task/store-phase2-refs
#1 / 1
refactor(store): Phase 2 — extract ref and HEAD management into muse/core/refs.py
Expand muse/core/refs.py from 2 primitives to the full ref/HEAD module:
Moved from store.py → refs.py: - RefConflictError (exception) - write_branch_ref (atomic CAS ref write, advisory flock) - SymbolicHead, DetachedHead, HeadState (typed HEAD representations) - read_head, read_current_branch, write_head_branch, write_head_commit - get_head_commit_id, resolve_any_ref, get_all_branch_heads
store.py imports all moved symbols from refs.py and contains no HEAD/ref implementation. Direct callers updated: muse/core/migrate.py, muse/cli/commands/init.py, update_ref.py, worktree.py, bridge.py (inline), and 7 test files that own ref-specific test coverage.
sha256:37ed8fecaafe7d683537a0182d49132c06dcef1f9016d218281831d30d58ed01
sha
+36
~39
−15
symbols
sha256:021473ac96b368d5cc5925ec9cd452ed52711c0a625d66b1372b38d407348b52
snapshot
+36
symbols added
~39
symbols modified
−15
symbols removed
0
dead code introduced
Semantic Changes
90 symbols
+
get_all_branch_heads
function
function get_all_branch_heads L385–397 ← moved from muse/core/store.py
+
read_current_branch
function
function read_current_branch L303–316 ← moved from muse/core/store.py
−
get_all_branch_heads
function
function get_all_branch_heads L1428–1440 → moved to muse/core/refs.py
~
read_ref
0 comments
To add a comment, use the Muse CLI:
muse hub commit comment sha256:37ed8fecaafe7d683537a0182d49132c06dcef1f9016d218281831d30d58ed01 --body "your comment"
No comments yet. Be the first to start the discussion.