fix: restore sha256: prefix in all text output short IDs
The 'sha256:' prefix is canonical — it identifies the hash algorithm. Strip it from disk paths (Windows constraint) but preserve it everywhere the user or agent sees a commit ID.
Before: commit_id.removeprefix('sha256:')[:8] → 'a1b2c3d4' After: 'sha256:' + commit_id.removeprefix('sha256:')[:8] → 'sha256:a1b2c3d4'
Commands fixed: commit.py, checkout.py, cherry_pick.py (6 text output sites) Tests updated: test_cmd_commit.py, test_cmd_checkout.py, test_cmd_cherry_pick_hardening.py
TestTextOutputHex classes now assert sha256: prefix IS present and that exactly 8 meaningful hex chars follow it.
sha256:38d631372251d1dc8fb2d0c7df5faebd3a2d153e270bc328ac089b1a66d78578
sha
+5
~10
−5
symbols
sha256:8570ce727819992370c963010125f63d1b1de42ebb6297f8d618940360a3d571
snapshot
+5
symbols added
~10
symbols modified
−5
symbols removed
0
dead code introduced
Semantic Changes
20 symbols
~
run
~
run
~
run
+
test_dry_run_text_shows_prefixed_short_id
method
method test_dry_run_text_shows_prefixed_short_id L1158–1176
+
test_picked_text_shows_prefixed_short_id
method
method test_picked_text_shows_prefixed_short_id L1144–1156
−
test_text_output_no_sha256_prefix_in_short_id
method
method test_text_output_no_sha256_prefix_in_short_id L1095–1105
+
test_dry_run_shows_prefixed_short_id
method
method test_dry_run_shows_prefixed_short_id L1087–1092
+
test_real_commit_shows_prefixed_short_id
method
method test_real_commit_shows_prefixed_short_id L1079–1085
+
test_text_output_has_8_meaningful_hex_chars
method
method test_text_output_has_8_meaningful_hex_chars L1094–1102
0 comments
To add a comment, use the Muse CLI:
muse hub commit comment sha256:38d631372251d1dc8fb2d0c7df5faebd3a2d153e270bc328ac089b1a66d78578 --body "your comment"
No comments yet. Be the first to start the discussion.