Re: [PATCH 1/4] http: fix retry count and Retry-After timing
- From
- Ravi Mistry <rmistry@google.com>
- Date
- Nov 3, 2026, 19:05 UTC
- Message-ID
- <CAF+mdida+tKjE884ZvsgLndzK8AvY0csYLzKPMmXkUpDF0r9ug@mail.gmail.com>
- In-Reply-To
- <xmqqpkwmenf3.fsf@gitster.g>
Junio C Hamano <gitster@pobox.com> writes:
Show 10 quoted lines
> > - /* If retries are disabled and we got a 429, fail immediately */ > > - if (ret == HTTP_RATE_LIMITED && !http_max_retries) > > - return HTTP_ERROR; > > - > > I am not sure I get this removal. If it is because the change to > the next hunk (the condition to loop with the while statement) > already covers it, I guess it makes sense, because we never enter > the while() loop and we will return HTTP_ERROR more or less the same > way as the above if http_max_retries is false.
Yes, and moving that check to after the while() loop also handles the case where the initial request returns 401 and the re-authenticated request inside the loop returns 429 when http.maxRetries is 0, without falsely logging "retries-exhausted". I clarified this in the commit message in v2.
Thanks!