gabriel / muse public
Closed #45
filed by gabriel human · 33 days ago

Add --branch flag to muse log

0 Anchors
Blast radius
Churn 30d
0 Proposals

Add --branch flag to muse log

Background

muse log currently has no way to target a specific branch without first checking it out. Attempting muse log --branch <name> fails with unrecognized arguments: --branch. This came up during debugging when trying to inspect main's tip without switching branches.

Goal

muse log --branch <name> (or equivalent flag) reads history from the named branch without touching the working tree or HEAD.

Proposed interface

muse log --branch main --oneline --max-count 5
muse log -b dev --json

Should be composable with all existing muse log flags (--oneline, --max-count, --json, etc.).

Acceptance criteria

  • muse log --branch <name> walks history from the named branch tip
  • Works alongside all existing flags
  • No working-tree or HEAD side-effects
  • muse log --json --branch <name> returns the standard log JSON shape
Activity1
gabriel opened this issue 33 days ago
gabriel 18 days ago

Fixed on dev (sha256:c69d8cff).

The positional ref argument (muse log main) already worked with no working-tree/HEAD side-effects, but --branch/-b genuinely didn't exist as an explicit flag. Added --branch/-b as an alias for the positional ref, composable with all existing flags. Passing both --branch and a positional ref together is rejected as ambiguous rather than silently picking one.

6 new tests in tests/test_log_branch_flag.py (flag matches positional, short -b form, no HEAD side-effect, composes with --oneline/--max-count, --json shape, ambiguity rejection). All 139 existing log tests across 5 files still pass.

closed this issue 18 days ago