Re: [PATCH 3/4] http: add http.retryStatusCodes config option
- From
- Ravi Mistry <rmistry@google.com>
- Date
- Nov 3, 2026, 19:06 UTC
- Message-ID
- <CAF+mdiebXKufLYYubtMvxqA53Ovwig9o0ZZM6=30L58yAz9TJw@mail.gmail.com>
- In-Reply-To
- <xmqqld7aav7p.fsf@gitster.g>
Junio C Hamano <gitster@pobox.com> writes:
Show 8 quoted lines
> - "Too Many Requests", which is a helpful comment to highlight what > 429 is, is lost, and > > - What we want to say is that there is a customizable set of HTTP > response codes that we treat as "the other side invites us to > retry if we want to", and that HTTP 429 is the ONLY member of > that set by default. But "HTTP 429 by default" alone in the > above description does not quite say so.
Makes sense. In v2 I restored "Too Many Requests" and stated explicitly in all three entries that the set of retryable status codes is configured by http.retryStatusCodes, which includes only HTTP 429 by default.
> Also 400 <= code < 600 is a constant throughout the function and it > is a tad strange to see it in the loop control part of a for() > statement.
I moved the 400 <= code < 600 check to an early return at the top of is_retryable_http_code() in v2.
Thanks!