fix: guard against init-sentinel refs from empty remote repos
A freshly created remote repo returns branch head values like 'init-sha256:<12-hex>' to signal the branch has no commits yet. The push command was passing these directly to commit_exists() → split_id(), which raised ValueError (hex portion not 64 chars).
Fix: add _is_valid_commit_id() which wraps split_id() in a try/except and returns False for any malformed ID. Guard both call sites in run() that pass remote ref values to commit_exists() — the candidate_have filter and the branch_have construction.
Tests: TestT13InitSentinel (4 tests) covering crash guard, sentinel filtering from have list, valid refs alongside sentinel, and empty branch_heads.
sha256:9e28bb3830e4cae4a4e709426bf311c0f9f0423d826798e3f2618cb2d15e3101
sha
sha256:3ea38320d8f536678f99c42480e3f43f2c77773e2006e00cf31e8a96b3bf8d2d
snapshot
0 comments
To add a comment, use the Muse CLI:
muse hub commit comment sha256:9e28bb3830e4cae4a4e709426bf311c0f9f0423d826798e3f2618cb2d15e3101 --body "your comment"
No comments yet. Be the first to start the discussion.