gabriel / muse public
feat BREAKING plumbing feat/plumbing-batch #1 / 1
gabriel · 158 days ago · Apr 9, 2026 · Diff

feat(plumbing): add --batch/--batch-check to cat-object, --stdin/--raw to snapshot-diff

- cat-object --batch: git cat-file --batch protocol (oid blob size / content / missing) - cat-object --batch-check: header-only variant for bulk presence checks - snapshot-diff --stdin: reads <ref_a> <ref_b> pairs from stdin, NDJSON or text out - snapshot-diff --raw: includes OIDs in text output for added/modified/deleted - 67 tests covering all new flags including stress, binary, and security cases

sha256:e5c2aac797c69e19a958bc54c5ed60c2fa29e2ec6b2bc81000b3d0023c0de051 sha
+42 ~15 symbols
sha256:0da049d3924bf2d1540c8c36575363edcf0839bd864e78b8053b74ca3c3f4b49 snapshot
+42
symbols added
~15
symbols modified
0
dead code introduced
Semantic Changes 57 symbols
~ muse/cli/commands/plumbing/cat_object.py .py 2 symbols added, 2 symbols modified
+ _run_batch function function _run_batch L134–166
+ pathlib import import pathlib L66–66
~ run
~ muse/cli/commands/plumbing/snapshot_diff.py .py 3 symbols added, 2 symbols modified
+ _OID_WIDTH variable variable _OID_WIDTH L82–82
+ _compute_diff function function _compute_diff L145–199
+ _emit_text function function _emit_text L202–227
~ run
~ tests/test_plumbing_cat_object.py .py 20 symbols added, 11 symbols modified
+ TestBatchCheckMode class class TestBatchCheckMode L339–388
+ test_batch_check_emits_header_only_no_content method method test_batch_check_emits_header_only_no_content L340–350
+ test_batch_check_invalid_oid_emits_missing method method test_batch_check_invalid_oid_emits_missing L359–363
+ test_batch_check_missing_emits_missing method method test_batch_check_missing_emits_missing L352–357
+ test_batch_check_mixed method method test_batch_check_mixed L365–376
+ test_batch_check_size_accurate method method test_batch_check_size_accurate L378–388
+ TestBatchMode class class TestBatchMode L236–331
+ test_batch_binary_content_round_trips method method test_batch_binary_content_round_trips L295–304
+ test_batch_empty_lines_skipped method method test_batch_empty_lines_skipped L286–293
+ test_batch_empty_stdin_produces_no_output method method test_batch_empty_stdin_produces_no_output L306–310
+ test_batch_invalid_oid_emits_missing method method test_batch_invalid_oid_emits_missing L258–263
+ test_batch_missing_oid_emits_missing method method test_batch_missing_oid_emits_missing L251–256
+ test_batch_mixed_present_and_missing method method test_batch_mixed_present_and_missing L265–284
+ test_batch_multiple_objects_in_order method method test_batch_multiple_objects_in_order L312–326
+ test_batch_mutually_exclusive_with_batch_check method method test_batch_mutually_exclusive_with_batch_check L328–331
+ test_batch_single_object_emits_header_and_content method method test_batch_single_object_emits_header_and_content L237–249
+ test_no_object_id_without_batch_flag_errors method method test_no_object_id_without_batch_flag_errors L216–219
+ test_batch_path_traversal_treated_as_missing method method test_batch_path_traversal_treated_as_missing L419–424
+ test_batch_50_objects method method test_batch_50_objects L460–474
+ test_batch_check_100_objects method method test_batch_check_100_objects L476–495
~ _cat
~ tests/test_plumbing_snapshot_diff.py .py 17 symbols added
+ TestSnapshotDiffRaw class class TestSnapshotDiffRaw L322–408
+ test_raw_added_includes_object_id method method test_raw_added_includes_object_id L325–336
+ test_raw_deleted_includes_object_id method method test_raw_deleted_includes_object_id L338–349
+ test_raw_has_no_effect_on_json_output method method test_raw_has_no_effect_on_json_output L379–392
+ test_raw_modified_includes_both_object_ids method method test_raw_modified_includes_both_object_ids L351–364
+ test_raw_stdin_batch_text_includes_oids method method test_raw_stdin_batch_text_includes_oids L394–408
+ test_text_without_raw_omits_object_ids method method test_text_without_raw_omits_object_ids L366–377
+ TestSnapshotDiffStdin class class TestSnapshotDiffStdin L197–319
+ test_empty_lines_and_comments_skipped method method test_empty_lines_and_comments_skipped L254–263
+ test_empty_stdin_produces_no_output method method test_empty_stdin_produces_no_output L278–282
+ test_invalid_ref_reported_inline_not_exit_error method method test_invalid_ref_reported_inline_not_exit_error L236–252
+ test_malformed_line_single_token_reported_inline method method test_malformed_line_single_token_reported_inline L265–276
+ test_multiple_pairs_emit_ndjson method method test_multiple_pairs_emit_ndjson L218–234
+ test_single_pair_via_stdin_json method method test_single_pair_via_stdin_json L200–216
+ test_stdin_all_errors_still_exits_0 method method test_stdin_all_errors_still_exits_0 L303–310
+ test_stdin_text_format_blank_line_separated method method test_stdin_text_format_blank_line_separated L284–301
+ test_stdin_zero_change_pair_included method method test_stdin_zero_change_pair_included L312–319
← Older Oldest on feat/plumbing-batch
All commits
Newer → Latest on feat/plumbing-batch

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:e5c2aac797c69e19a958bc54c5ed60c2fa29e2ec6b2bc81000b3d0023c0de051 --body "your comment"