gabriel / muse public
feat patch cat task/cat-staged-flag #1 / 1
AI Agent gabriel · 132 days ago · May 8, 2026 · Diff

feat(cat): add --staged flag to muse cat and muse code cat

Reads staged index (HEAD manifest + stage overrides) rather than the working tree or a commit ref. Mutually exclusive with --at. Mirrors 'git show :path'. Source ref is 'staged' in JSON output.

Tests: 11 new tests in TestCatStaged (core_cat), 8 new in TestCatStaged (code cat). 143 total tests passing.

sha256:11f1f8faa0ce023a10d4c2bb11760d030e7b3ccb0785e63325eb0382ee2a77ad sha
+22 ~4 symbols
sha256:57c7ce06fd56f76ab24aacb37e61e4ea795e0b4475354a357bc781121afa43f1 snapshot
+22
symbols added
~4
symbols modified
0
dead code introduced
Semantic Changes 26 symbols
~ muse/cli/commands/cat.py .py 2 symbols modified
~ muse/cli/commands/core_cat.py .py 2 symbols modified
~ tests/test_cmd_cat.py .py 9 symbols added
+ TestCatStaged class class TestCatStaged L475–561
+ test_staged_and_at_json_has_error method method test_staged_and_at_json_has_error L526–537
+ test_staged_and_at_mutually_exclusive method method test_staged_and_at_mutually_exclusive L519–524
+ test_staged_default_is_false method method test_staged_default_is_false L554–561
+ test_staged_falls_back_to_committed_when_no_stage_entry method method test_staged_falls_back_to_committed_when_no_stage_entry L509–517
+ test_staged_flag_registered method method test_staged_flag_registered L545–552
+ test_staged_json_source_ref_is_staged method method test_staged_json_source_ref_is_staged L501–507
+ test_staged_reads_staged_blob method method test_staged_reads_staged_blob L478–499
+ test_staged_untracked_file_errors method method test_staged_untracked_file_errors L539–543
~ tests/test_cmd_core_cat.py .py 13 symbols added
+ TestCatStaged class class TestCatStaged L662–787
+ test_staged_and_at_json_error_code method method test_staged_and_at_json_error_code L734–744
+ test_staged_and_at_mutually_exclusive method method test_staged_and_at_mutually_exclusive L726–732
+ test_staged_default_is_false method method test_staged_default_is_false L780–787
+ test_staged_deletion_gives_file_not_tracked method method test_staged_deletion_gives_file_not_tracked L705–713
+ test_staged_deletion_json_error_code method method test_staged_deletion_json_error_code L715–724
+ test_staged_flag_registered method method test_staged_flag_registered L771–778
+ test_staged_ignores_working_tree_edits method method test_staged_ignores_working_tree_edits L754–769
+ test_staged_json_source_ref_is_staged method method test_staged_json_source_ref_is_staged L680–690
+ test_staged_on_committed_file_without_restaing_shows_committed_content method method test_staged_on_committed_file_without_restaing_shows_committed_content L692–703
+ test_staged_reads_staged_blob_not_disk method method test_staged_reads_staged_blob_not_disk L665–678
+ test_staged_untracked_file_not_readable method method test_staged_untracked_file_not_readable L746–752
+ _stage_file_core function function _stage_file_core L650–659
← Older Oldest on task/cat-staged-flag
All commits
Newer → Latest on task/cat-staged-flag

0 comments

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

To add a comment, use the Muse CLI: muse hub commit comment sha256:11f1f8faa0ce023a10d4c2bb11760d030e7b3ccb0785e63325eb0382ee2a77ad --body "your comment"