Question about Git protocol v2 status

2 messages, 2 authors, 2024-06-11 · open the first message on its own page

Question about Git protocol v2 status

From: rlee <hidden>
Date: 2024-06-11 00:21:39

Hi all,

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?

Thanks,

rlee287 [at] proton [dot] me

Re: Question about Git protocol v2 status

From: Jeff King <hidden>
Date: 2024-06-11 09:26:38

On Tue, Jun 11, 2024 at 12:21:26AM +0000, rlee wrote:
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
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help