fn classify_rev_parse(
output: GitOutput,
presence: RepoPresence,
) -> Result<String, RepoGate>Expand description
Classify git rev-parse --abbrev-ref HEAD output into either the
branch string to proceed with, or the terminal repo_gate. Empty
stdout is a clean “not a repo” signal (git ran and reported it);
Oversize means the scan subprocess itself misbehaved.
presence resolves the non-zero-exit case, which is ambiguous on
its own: git exits 128 both outside a repo and when it fails inside
one, so only the narrower repo-existence question separates a
legitimate non-repo from a sick scanner.