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

Re: [PATCH] Revert "fetch: default to protocol version 2"

From
Jeff King <peff@peff.net>
Date
Apr 22, 2020, 19:40 UTC
Message-ID
<20200422194047.GD558336@coredump.intra.peff.net>
In-Reply-To
<20200422155047.GB91734@google.com>
On Wed, Apr 22, 2020 at 08:50:47AM -0700, Jonathan Nieder wrote:
Show 5 quoted lines
> This reverts commit 684ceae32dae726c6a5c693b257b156926aba8b7.
> 
> Users fetching from linux-next and other kernel remotes are reporting
> that the limited ref advertisement causes negotiation to reach
> MAX_IN_VAIN, resulting in too-large fetches.
OK, now that we have data I think this strategy is reasonable.

That said, it will take a while to make it to a release, so we very well may have brought v2 and v0 to parity in the meantime.

Show 10 quoted lines
> > To get you unstuck, the immediate workaround is to drop back to the
> > older protocol, like:
> >
> >   git -c protocol.version=0 fetch --all
> 
> By the way, I'd recommend the immediate workaround of
> 
> 	git fetch --negotiation-tip=refs/remotes/xo/* xo
> 
> instead.  But that's a separate subject.

It seems like if we are fetching with refspec X/*:Y/* that we should perhaps automatically select our local Y/* negotiation tips.

That said, neither it (nor the manual version above) would help the case I've been testing with. It's a first fetch from "xo", which can reuse history we already have from other remotes.

I agree it's a good workaround for folks doing their daily fetches, though.

-Peff
Previous: Junio C HamanoNext: Jeff King
Message 14 of 18 in “Git 2.26 fetches many times more objects than it should, wasting gigabytes”
  1. Lubomir RintelApr 22, 2020
  2. Jeff KingApr 22, 2020
  3. Jeff KingApr 22, 2020
  4. Jeff KingApr 22, 2020
  5. Junio C HamanoApr 22, 2020
  6. Jeff KingApr 22, 2020
  7. Jonathan TanApr 23, 2020
  8. Junio C HamanoApr 23, 2020
  9. Jeff KingApr 24, 2020
  10. Jonathan NiederApr 22, 2020
  11. Jeff KingApr 22, 2020
  12. Revert "fetch: default to protocol version 2"Jonathan Nieder, Apr 22, 2020
  13. Junio C HamanoApr 22, 2020
  14. Jeff KingApr 22, 2020
  15. Jeff KingApr 22, 2020
  16. Jonathan NiederApr 22, 2020
  17. Junio C HamanoApr 22, 2020
  18. Jeff KingApr 22, 2020

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.