Commit 640657ffd0 added HTTP 429 retries controlled by http.maxRetries, http.retryAfter and http.maxRetryTime. Ravi Mistry's series addresses four gaps he saw when running Git against hosting backends and reverse proxies under high concurrency.

The first patch fixes two small bugs. Because http_request_recoverable() pre-decrements its retry counter, http.maxRetries=1 performs no retries, and N configured retries perform N-1. The Retry-After header is also read only after Trace2 logging has already run.

The second patch adds an http.retryStatusCodes option. 429 stays the default, since the author argues that retrying 5xx responses unconditionally could hide a permanently broken proxy or server. The third patch changes the default http.retryAfter from 0 to 10 seconds, so that a server that sends no Retry-After header is not hit again immediately. The fourth doubles the delay on each attempt (http.retryAfter * 2^(attempt-1)), clamped at http.maxRetryTime.

The series also adds an http_retry_wait() helper and uses it in post_rpc(). The actual data transfer in fetch and clone, and on-demand blob downloads in partial clones, are POST requests that previously gave up on 429 or 5xx. Retries apply only to git-upload-pack and git-upload-archive. git-receive-pack is excluded because retrying a push after a 502 or 504 is unsafe if the remote already processed it.

Junio C Hamano commented on the wording of the documentation for the status-code option, said it was fine, and said he would replace the topic. He will mark it ready for 'next' unless he hears objections in a few days. He also pointed out that when start_active_slot() fails, run_one_slot() returns HTTP_START_FAILED without calling finish_active_slot(), so report_rpc_error() could print the http_code and curl_result of the previous attempt. Ravi Mistry agreed that this does not change what Git does next, because HTTP_START_FAILED is never retried. He will clear the results before each run_one_slot() call in post_rpc() and probe_rpc() in v5.