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

Re: [BUG] Git push sends too much data unnecessarily

From
Rajiv Sharma <rajiv.tilakraj.sharma@gmail.com>
Date
Jan 14, 2026, 21:48 UTC
Message-ID
<CAGe2LO188CuDetOKRQZs8MNw3Fq9LxpAwM8HMEP2AMHAB_g0_A@mail.gmail.com>
In-Reply-To
<20260114211115.GC1008851@coredump.intra.peff.net>

Ah you are right, "push.negotiate" is exactly what is needed here. I tried this out and it works like a charm. Thanks for sorting this out.

- Rajiv Sharma
On Wed, Jan 14, 2026 at 9:11 PM Jeff King <peff@peff.net> wrote:
Show 27 quoted lines
>
> On Wed, Jan 14, 2026 at 05:39:43PM +0000, Rajiv Sharma wrote:
>
> > > This boils down to how Git negotiates between the client <> server
> >
> > I think that's the crux of the problem here. I don't think git
> > negotiates in the push path the way it does in the read path, i.e.
> > there is no process of client-server communication that involves
> > gradually arriving at the common base (in this case it would be C3).
> > The read path does this quite well (using something akin to a skiplist
> > IIRC?) and the common base is found in a couple iterations in most
> > cases. I am unaware of the historical context behind this difference
> > but I assume the server sending unnecessary extra data during the read
> > path would be much more expensive than the client doing it hence the
> > push protocol is kept simpler.
> >
> > This kind of negotiation _could_ be added to the push path but it
> > would be a breaking change. I read somewhere that there were plans for
> > Push Protocol V2 (in the same vein as Read Protocol V2) so it would be
> > great to see this improvement making its way there!
>
> I think you may have misunderstood Junio's response. We do have
> push.negotiate already. It's just not the default.
>
> Did you try your example with "git -c push.negotiate=true push ..."?
>
> -Peff
Previous: Jeff KingNext: Karthik Nayak
Message 6 of 7 in “[BUG] Git push sends too much data unnecessarily”
  1. Rajiv SharmaJan 14, 2026
  2. Karthik NayakJan 14, 2026
  3. Junio C HamanoJan 14, 2026
  4. Rajiv SharmaJan 14, 2026
  5. Jeff KingJan 14, 2026
  6. Rajiv SharmaJan 14, 2026
  7. Karthik NayakJan 15, 2026

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.