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

Re: [PATCH 4/4] Doc: push with --base

From
Jeff King <peff@peff.net>
Date
Nov 9, 2020, 21:40 UTC
Message-ID
<20201109214011.GA668551@coredump.intra.peff.net>
In-Reply-To
<xmqq8sbab52p.fsf@gitster.c.googlers.com>
On Mon, Nov 09, 2020 at 01:20:14PM -0800, Junio C Hamano wrote:
> Would the earlier refactoring of the negotiation part into a
> separate negotiator module help, or did the refactor not remove the
> deep assumption that it is only about the fetch/upload-pack traffic
> and we need a design for push/receive-pack from scratch?

I haven't thought too deeply about this problem area, but there is one challenge I'd expect with reusing the existing negotiation protocol and code: the stateless side is flipped for http.

In the fetch protocol, the client is stateful and makes a series of requests to a stateless server, each time saying "I want X, we agreed previously on Y, and here are some more options Z; let me know if that's enough to generate a pack". If we were to flip that around, the client must remain the stateful party, but it's no longer the receiver of the pack. For the receiver (i.e., the stateless server) to iterate through its history looking for a shard point, I think the message would have to be more like "last time you told me about X, and gave me cut-points Y to resume your traversal; tell me more about Y so that I can decide if we're ready to send a pack".

-Peff
Previous: Junio C HamanoNext: Jonathan Tan
Message 18 of 21 in “"Push" protocol change proposal: user-specified base”
  1. 0/4 "Push" protocol change proposal: user-specified baseJonathan Tan, Nov 3, 2020
  2. 1/4 connect: refactor building of Extra ParametersJonathan Tan, Nov 3, 2020
  3. 2/4 push: teach --base for ssh:// and file://Jonathan Tan, Nov 3, 2020
  4. SZEDER GáborNov 3, 2020
  5. Junio C HamanoNov 8, 2020
  6. Derrick StoleeNov 3, 2020
  7. Junio C HamanoNov 8, 2020
  8. 3/4 remote-curl: teach --base for http(s)://Jonathan Tan, Nov 3, 2020
  9. Junio C HamanoNov 3, 2020
  10. 4/4 Doc: push with --baseJonathan Tan, Nov 3, 2020
  11. Jonathan NiederNov 3, 2020
  12. Jeff KingNov 3, 2020
  13. Junio C HamanoNov 3, 2020
  14. Jonathan TanNov 9, 2020
  15. Derrick StoleeNov 9, 2020
  16. Jonathan TanNov 9, 2020
  17. Junio C HamanoNov 9, 2020
  18. Jeff KingNov 9, 2020
  19. Jonathan TanNov 9, 2020
  20. Derrick StoleeNov 3, 2020
  21. Junio C HamanoNov 3, 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.