feat(checkout): --autostash flag with full test coverage
- Add --autostash to muse checkout: stash → switch → pop via try/finally, so the stash is always popped regardless of success or SystemExit - Stash message mirrors git idiom: 'WIP on <branch>: autostash' - --autostash + --dry-run: no stash created, assume clean for preview - --autostash + -b: no-op (no snapshot switch, changes preserved) - --autostash is mutually exclusive with --force and --merge - Add _stash_push_programmatic / _stash_pop_programmatic to stash.py as a clean programmatic API (no argparse, no prints, raises exceptions) - _stash_pop_programmatic wraps OSError from object-store integrity checks into RuntimeError for consistent caller contracts - _apply_autostash: text mode prints to stdout, JSON mode to stderr (keeps stdout machine-readable in --json mode) - Improve guard.py error to list all four remedies: stash / --merge / --force / --autostash with one-line descriptions - 33 tests: unit (programmatic API, _apply_autostash output/streams/ corrupt-object), integration (clean/dirty tree, JSON mode, new files, mutually exclusive flags, --dry-run, -b, round-trips)
0 comments
muse hub commit comment sha256:ccc437307c53f10bd6f01134e361b8576bcc669bad0bcbfbdd7d6e31d59d3519 --body "your comment"
No comments yet. Be the first to start the discussion.