git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* Question about Git protocol v2 status
@ 2024-06-11  0:21 rlee
  2024-06-11  9:26 ` Jeff King
  0 siblings, 1 reply; 2+ messages in thread
From: rlee @ 2024-06-11  0:21 UTC (permalink / raw)
  To: git@vger.kernel.org

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

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: Question about Git protocol v2 status
  2024-06-11  0:21 Question about Git protocol v2 status rlee
@ 2024-06-11  9:26 ` Jeff King
  0 siblings, 0 replies; 2+ messages in thread
From: Jeff King @ 2024-06-11  9:26 UTC (permalink / raw)
  To: rlee; +Cc: git@vger.kernel.org

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

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2024-06-11  9:26 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-06-11  0:21 Question about Git protocol v2 status rlee
2024-06-11  9:26 ` Jeff King

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).