Answer stability round 1: 0 🔴, 3 🟡 (0 misread); pin the guarded default-branch reads and which commit an amend drops, and name the pass and its counted commits in the refusal

This commit is contained in:
2026-10-28 18:10:57 +01:00
parent 720ffd58b6
commit 365b0f82a6
3 changed files with 26 additions and 8 deletions
+1 -1
View File
@@ -71,7 +71,7 @@ def default_ref(cwd: str | None = None, timeout: float | None = None, guarded: b
recorded = git("symbolic-ref", "--short", "refs/remotes/origin/HEAD", cwd=cwd, guarded=guarded)
if not isinstance(recorded, Failure):
return recorded.strip()
return Failure("origin records no default branch; set it with `git remote set-head origin --auto`") if guarded else origin_head(cwd, timeout)
return Failure("origin records no default branch") if guarded else origin_head(cwd, timeout)
for branch in ("main", "master"):
if not isinstance(git("rev-parse", "--quiet", "--verify", f"refs/heads/{branch}", cwd=cwd, guarded=guarded), Failure):
return branch