gabriel / muse public
fix main #18 / 100

fix: guard all apply_manifest callers against dirty working tree

Adds muse/cli/guard.py::require_clean_workdir() — a single pre-flight check that mirrors Git's behaviour: modified/deleted tracked files block the operation; brand-new untracked files are left alone.

Guards added to: merge, checkout, reset (--hard only), revert, cherry-pick. Each also gains a --force flag to bypass the guard when intentional.

Also restores branch.py (full git parity, colours) and log.py (lane-based --graph DAG renderer, --all flag) which were wiped by the merge that prompted this fix, and updates TestBranch to reflect the new safe-delete semantics (-d blocks unmerged branches, -D force-deletes them).

G Gabriel Cardona <gabriel@tellurstori.com> · 19h ago Mar 23, 2026 · 1f065285 · parent dc734ff5
9
files changed
415
files in snapshot

0 comments

No comments yet. Be the first to start the discussion.