Ignore a stray origin/HEAD and bound the default-branch lookup output

main

Commit

peyton-alt1w ago

A hand-set origin/HEAD pointing outside refs/remotes/origin/ was sent as a literal base; only a branch of origin now counts. The ls-remote lookup capped its output only after git had written it all to memory; both streams now go through limitedWriter, failing on stdout overflow and dropping excess stderr.

Co-Authored-By: Claude Opus 5.5 noreply@anthropic.com Entire-Checkpoint: 01M5R1BFQK7004Y2PFCVX7DXYC