Expand description
Thin git shell-out helpers.
Aristo deliberately avoids pulling in git2 / gix — those are
heavy dependencies for a handful of operations. We invoke the
user’s git binary on the system PATH and parse its stdout. The
invocations here are intentionally narrow:
rev_parse_headresolvesHEADto a 40-char SHA.commit_present_on_remotechecks whether a commit SHA appears on anyorigin/*ref viagit branch -r --contains <sha>. Used by the canon-verify push-first precheck (per WORKFLOW.md §4 + §7c “Push-first; mutagen later”).
Tests use real git init against a tempdir — the small extra
cost (≈ tens of ms per test) buys actual coverage of the
shell-out path. There’s no point mocking Command::output() here.
Enums§
- GitError
- Errors surfaced by the git shell-outs.
Functions§
- commit_
present_ on_ remote - True iff
commit_shaappears on at least oneorigin/*remote- tracking branch (the SDK’s push-first precheck). - rev_
parse_ head - Run
git rev-parse HEADinworkspace_rootand return the resolved 40-char (or 64-char SHA-256) SHA.