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

Re: Question about Git protocol v2 status

From
Jeff King <peff@peff.net>
Date
Jun 11, 2024, 09:26 UTC
Message-ID
<20240611092637.GA3264649@coredump.intra.peff.net>
In-Reply-To
<kMdINBpG8_XazfNJVjKkaYyCH4VKRgjQryAvNw2ceVZrNmJ8pqoowMgmGBhhDMS_-nQ02OX0dMglJA2EPrE39XIBtcZc8Wkr2Vcoh6_pzMg=@proton.me>
On Tue, Jun 11, 2024 at 12:21:26AM +0000, rlee wrote:
Show 14 quoted lines
> I've been looking into writing a custom Git remote helper. The man
> page for "gitremote-helpers" states that stateless-connect is used to
> connect to a Git server using v2 of the wire protocol, but that it is
> "Experimental; for internal use only." Moreover, the page describing
> protocol-v2 at https://git-scm.com/docs/protocol-v2 uses future tense,
> implying that v2 has not yet been finalized. However, the older blog
> post
> https://opensource.googleblog.com/2018/05/introducing-git-protocol-version-2.html
> states that v2 is expected to become part of Git v2.18 (with Git being
> many versions ahead of v2.18 by now), and my own testing shows that
> stateless-connect is used when performing Git operations via HTTPS
> with Github. Could I get some clarification on whether v2 is still
> experimental and on whether a custom gitremote-helper should declare
> (and implement) support for stateless-connect?

I think the docs are out of date. v2 is mature and has been the default since v2.29.0, courtesy of eb049759fb (protocol: re-enable v2 protocol by default, 2020-09-25).

The stateless-connect code is heavily exercised via git-remote-curl, but I suspect you may be the first other helper to use it. So it's possible you might find some corner cases. The point of it is mostly about turning the helper into a dumb pipe, so I'd be surprised if you found anything that caused us to rethink the helper interface there.

So my suggestion would be to work on it assuming that the interface is as documented, and let us know if you run into any problems (and likewise report success if you find it!).

-Peff
Previous: rlee
Message 2 of 2 in “Question about Git protocol v2 status”
  1. rleeJun 11, 2024
  2. Jeff KingJun 11, 2024

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.