fix(crow): probe the auto-patch branch with git ls-remote to avoid a scary fatal #133

Merged
pat-s merged 1 commit from t3code/gate-quiet-branch-probe into main 2026-07-17 11:52:07 +00:00
Owner

Follow-up to #132. The no-op path already worked (the else branch runs and exit 0s), but using git fetch as the existence check printed fatal: couldn't find remote ref auto/registry-patch-proposals to stderr — which looks like a failure even though the step succeeds.

Probe with git ls-remote --exit-code --heads origin ${patch_branch} instead: verified against the live repo it exits 0 for an existing branch and 2 for a missing one, silently (no fatal). Only fetch + checkout when the branch actually exists.

Net: same behavior, clean log — a run with no pending auto-patch branch prints just No ... branch; no pending auto-patch proposals to verify. and exits 0.

Follow-up to #132. The no-op path already worked (the `else` branch runs and `exit 0`s), but using `git fetch` as the *existence check* printed `fatal: couldn't find remote ref auto/registry-patch-proposals` to stderr — which looks like a failure even though the step succeeds. Probe with `git ls-remote --exit-code --heads origin ${patch_branch}` instead: verified against the live repo it exits 0 for an existing branch and 2 for a missing one, **silently** (no `fatal`). Only fetch + checkout when the branch actually exists. Net: same behavior, clean log — a run with no pending auto-patch branch prints just `No ... branch; no pending auto-patch proposals to verify.` and exits 0.
The no-op path worked (the else branch runs and exits 0), but using `git fetch`
as the existence check printed `fatal: couldn't find remote ref ...` to stderr
when the branch is absent -- which reads as a failure even though the step
succeeds. Probe with `git ls-remote --exit-code --heads` instead, which is
silent and sets a clean exit code; only fetch/checkout when the branch exists.
pat-s merged commit a30c6f9532 into main 2026-07-17 11:52:07 +00:00
pat-s deleted branch t3code/gate-quiet-branch-probe 2026-07-17 11:52:08 +00:00
Sign in to join this conversation.
No reviewers
No labels
No milestone
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
devxy/build-cran-binaries!133
No description provided.