git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: RFC: Would a config fetch.retryCount make sense?

From
Ben Peart <peartben@gmail.com>
Date
Jun 1, 2017, 13:33 UTC
Message-ID
<cf8ce12b-8d5a-ae03-efd8-0f82ea40fce7@gmail.com>
In-Reply-To
<6762A30E-C558-4085-943B-AB85EBF18706@gmail.com>
On 6/1/2017 8:48 AM, Lars Schneider wrote:
Show 9 quoted lines
> Hi,
> 
> we occasionally see "The remote end hung up unexpectedly" (pkt-line.c:265)
> on our `git fetch` calls (most noticeably in our automations). I expect
> random network glitches to be the cause.
> 
> In some places we added a basic retry mechanism and I was wondering
> if this could be a useful feature for Git itself.
> 

Having a configurable retry mechanism makes sense especially if it allows continuing an in-progress download rather than aborting and trying over. I would make it off by default so that any existing higher level retry mechanism doesn't trigger a retry storm if the problem isn't a transient network glitch.

Internally we use a tool (https://github.com/Microsoft/GVFS/tree/master/GVFS/FastFetch) to perform fetch for our build machines. It has several advantages including retries when downloading pack files.

It's biggest advantage is that it uses multiple threads to parallelize the entire fetch and checkout operation from end to end (ie the download happens in parallel as well as checkout happening in parallel with the download) which makes it take a fraction of the overall time.

When time permits, I hope to bring some of these enhancements over into git itself.

Show 6 quoted lines
> E.g. a Git config such as "fetch.retryCount" or something.
> Or is there something like this in Git already and I missed it?
> 
> Thanks,
> Lars
> 
Previous: Lars SchneiderNext: Lars Schneider
Message 2 of 5 in “RFC: Would a config fetch.retryCount make sense?”
  1. Lars SchneiderJun 1, 2017
  2. Ben PeartJun 1, 2017
  3. Lars SchneiderJun 5, 2017
  4. Ben PeartJun 5, 2017
  5. Stefan BellerJun 1, 2017

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.