code review cleanup

main

Commit

Soph3mo ago
  • Drop internal basicAuth duplicate; use transporthttp.BasicAuth directly in the gitproto retry path (the package already pulls in go-git types via the AuthMethod interface contract).
  • Collapse GitCredentialHelper.Approve/Reject into a single signal() helper; they only differed in the op string.
  • Type the credential op as auth.CredentialOp with named constants (CredentialOpFill / Approve / Reject), removing magic strings from production code and the integration test switch.
  • Collapse fakeCredentialHelper's six counters/last-X fields into a single calls []credCall slice with count(op)/last(op) accessors.
  • Add a newTestConn(t, rt) helper to deduplicate the 8 new tests.
  • Trim narrating comments throughout (per code review). Kept the CredentialHelper interface contract, the GIT_TERMINAL_PROMPT=0 rationale, the 403-Cloudflare anecdote, and the explicit-auth-wins invariant — these encode non-obvious WHY. Trimmed the rest.

No behaviour change; full test suite + race detector + golangci-lint pass clean.

Co-Authored-By: Claude Opus 4.7 (1M context) noreply@anthropic.com Entire-Checkpoint: 4f0fc9b99fdc

Checkpoints

can you take a look at https://github.com/entireio/git-sync/issues/63

Claude CodeOpus 4.7[1m]
View session
Checkpoint 1