refactor: canonicalize all long IDs through long_id() helper
Replace every bare string concatenation 'sha256:' + x and f-string f'sha256:{x}' with long_id(x) across production code and test files.
- Added long_id() helper to muse/core/_types.py with algo and strip params - Updated 12 production modules: snapshot, object_store, stat_cache, workdir, patch_record, hub_trust, code/plugin, rebase, range_diff, verify_pack, bundle, shelf, reflog, maintenance, format_patch, apply_patch, count_objects, prune, hash_object, verify_object, ls_tree, name_rev - Updated 85+ test files with long_id() calls and proper imports - Fixed test_rebase_supercharge.py TestShortId to import short_id from _types instead of non-existent _short_id from rebase module
sha256:9bcb403b0377d44b72f6336fafcd2ae3b3ca44200e9bb5d58db43f3da0d671a7
sha
+112
~417
−127
symbols
sha256:fb28d1bef384e6aa8e6a2056945c0f300bf9a30a4e952d9ce2c6f8734c79972e
snapshot
+112
symbols added
~417
symbols modified
−127
symbols removed
0
dead code introduced
Semantic Changes
656 symbols
~
short_id
~
Manifest
~
Manifest
~
_store
~
TestEmit
−
test_early_exit_when_all_targets_found
method
method test_early_exit_when_all_targets_found L272–279
−
test_ansi_in_branch_name_sanitized_text
method
method test_ansi_in_branch_name_sanitized_text L581–590
−
test_stdin_empty_with_no_positional_errors
method
method test_stdin_empty_with_no_positional_errors L480–484
~
Manifest
−
test_commit_does_not_leave_partial_state_on_apply_manifest_failure
method
method test_commit_does_not_leave_partial_state_on_apply_manifest_failure L212–232
−
test_parent_objects_missing_rewritten_on_next_commit
method
method test_parent_objects_missing_rewritten_on_next_commit L163–210
−
test_second_commit_stores_all_objects
method
method test_second_commit_stores_all_objects L129–140
−
test_unchanged_file_object_present_after_second_commit
method
method test_unchanged_file_object_present_after_second_commit L142–161
−
test_apply_manifest_does_not_raise_after_commit
method
method test_apply_manifest_does_not_raise_after_commit L317–327
−
test_apply_manifest_does_not_raise_when_parent_objects_were_missing
method
method test_apply_manifest_does_not_raise_when_parent_objects_were_missing L329–342
−
test_checkout_after_commit_with_missing_parent_objects
method
method test_checkout_after_commit_with_missing_parent_objects L245–276
−
test_checkout_back_and_forth_after_multi_commit_session
method
method test_checkout_back_and_forth_after_multi_commit_session L278–305
~
Manifest
~
Manifest
~
_sha
~
_oid
~
Manifest
0 comments
To add a comment, use the Muse CLI:
muse hub commit comment sha256:9bcb403b0377d44b72f6336fafcd2ae3b3ca44200e9bb5d58db43f3da0d671a7 --body "your comment"
No comments yet. Be the first to start the discussion.