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

Re: [RFC PATCH] push: perform negotiation before sending packfile

From
JTJonathan Tan <jonathantanmy@google.com>
Date
Feb 19, 2021, 00:42 UTC
Message-ID
<20210219004242.1179999-1-jonathantanmy@google.com>
In-Reply-To
<xmqqy2fldsy4.fsf@gitster.g>
Show 8 quoted lines
> For a real implementation, I think we'd want to do the negotiation
> inside the conversation between send-pack and receive-pack, so that
> what is agreed to be common between two parties will not shift in
> the middle (in the same spirit that upload-pack grabs all the
> relevant refs first, advertises them, negotiates what is common and
> creates a pack, all using the same worldview of where the tips of
> refs are throughout the process, even if some refs change in the
> meantime).

Upload-pack does that for protocol v0 ssh:// and git:// but not http(s)://, and does not do that for protocol v2, I believe.

If we were to do that, I don't think it would work for the transports that have are stateless (e.g. HTTP). Also, this seems like it would involve a significant reworking of how the server serves (receive-pack would need to know to communicate just like upload-pack does temporarily before proceeding with its usual behavior, and the client would need to learn this new way - as opposed to the idea in this patch to do it separately and reuse the already existing fetch and push mechanisms). I think the greater complexity is not worth it for something that won't work in HTTP, but I'm open to other opinions.

Previous: Junio C HamanoNext: Junio C Hamano
Message 5 of 9 in “push: perform negotiation before sending packfile”
  1. push: perform negotiation before sending packfileJonathan Tan, Feb 18, 2021
  2. Junio C HamanoFeb 18, 2021
  3. Junio C HamanoFeb 18, 2021
  4. Junio C HamanoFeb 18, 2021
  5. Jonathan TanFeb 19, 2021
  6. Junio C HamanoFeb 20, 2021
  7. Jonathan TanFeb 22, 2021
  8. Junio C HamanoFeb 22, 2021
  9. Jonathan TanFeb 18, 2021

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.