mirror of
https://relay.ngit.dev/npub15qydau2hjma6ngxkl2cyar74wzyjshvl65za5k5rl69264ar2exs5cyejr/ngit-grasp.git
synced 2026-10-06 07:28:23 +00:00
Several fixture steps discarded git exit statuses even though later pushes and deterministic-hash assertions depend on them. The nip09 helpers were the worst case: `git branch main` + `git checkout main` with both results ignored only worked when the clone's initial branch was NOT already main, so the helpers passed under init.defaultBranch=main by accident (git exits 128 when the branch exists). Replace the dance with a checked `git checkout -B main` that panics with git's stderr when branch setup genuinely fails. Also checked now, failing loudly with context: - fixtures.rs: orphan-branch dances (checkout --orphan, rm --cached, branch -m/-M) behind a new run_fixture_git helper, the PurgatoryOwnerStateDataPushed checkout -B, and clone_repo's identity config, which the pinned hashes are derived from - push_authorization.rs: checkout -b develop1 exit code (previously only the spawn error was inspected) and ls-remote failures, which were indistinguishable from "ref absent" - purgatory_helpers.rs: remote set-url/add in push_ref_to_relay now go through run_git instead of `let _` - sync_helpers.rs: rev-parse HEAD is asserted before its output flows into a state event Deliberate best-effort calls (git clean -fd, deleting a possibly absent local main before renaming an orphan branch onto it) keep discarding their status, now with comments saying why. Validated: cargo clippy --workspace --all-targets -D warnings; full suite runs under both benign and hostile git config in the final validation pass.