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

Re: [RFC 0/7] transitioning to protocol v2

From
Junio C Hamano <gitster@pobox.com>
Date
Aug 25, 2017, 01:19 UTC
Message-ID
<xmqq7exsv3yu.fsf@gitster.mtv.corp.google.com>
In-Reply-To
<20170824225328.8174-1-bmwill@google.com>
Brandon Williams <bmwill@google.com> writes:
Show 7 quoted lines
> The best way to preserve functionality with old servers and clients would be to
> communicate using the same end point but have the client send a bit of extra
> information with its initial request.  This extra information would need to be
> sent in such a way that old servers ignore it and operate normally (using
> protocol v1).  The client would then need to be able to look at a server's
> response to determine whether the server understands and is speaking v2 or has
> ignored the clients request to use a newer protocol and is speaking v1.

Good. I think the idle talk last round was for the server to tell the v1 client "we are still doing the slow ls-remote comes first protocol with this exchange, but just for future reference, you can use the v2 endpoint with me", which was way less desirable (even though it may be safer).

Show 5 quoted lines
> Patches 1-5 enable a client to unconditionally send this back-channel
> information to a server.  This is done by sending a version number after a
> second NUL byte in git://, in the envvar GIT_PROTOCOL in file:// and ssh://,
> and in an http header in http://, https://.  Patches 6-7 teach a client and
> upload-pack to send and recognize a request to use protocol v2.
All sounds sensible.
 - for git://, if you say you found a hole in the protocol to stuff
   this information, I simply believe you ;-)  Good job.
 - http:// and https:// should be a no-brainer as the HTTP headers
   give ample room to send information from the initiator side.
 - For ssh://, I do not think it is sane to assume that we can
   convince server operators to allow passing any random environment
   variable.  If the use of this specific variable turns out to be
   popular enough, however, and its benefit outweighs administrative
   burden, perhaps it is not impossible to convince them to allow
   AcceptEnv on this single variable.
Thanks.
Previous: Brandon WilliamsNext: Stefan Beller
Message 15 of 31 in “[RFC 0/7] transitioning to protocol v2”
  1. Brandon WilliamsAug 24, 2017
  2. 1/7 pkt-line: add packet_write functionBrandon Williams, Aug 24, 2017
  3. 2/7 pkt-line: add strbuf_packet_readBrandon Williams, Aug 24, 2017
  4. 3/7 protocol: tell server that the client understands v2Brandon Williams, Aug 24, 2017
  5. Junio C HamanoAug 25, 2017
  6. Brandon WilliamsAug 25, 2017
  7. Brandon WilliamsAug 25, 2017
  8. 5/7 http: send Git-Protocol-Version headerBrandon Williams, Aug 24, 2017
  9. Kevin DaudtAug 30, 2017
  10. 6/7 transport: teach client to recognize v2 server responseBrandon Williams, Aug 24, 2017
  11. 7/7 upload-pack: ack version 2Brandon Williams, Aug 24, 2017
  12. Bryan TurnerSep 1, 2017
  13. Brandon WilliamsSep 1, 2017
  14. 4/7 t: fix ssh tests to cope with using '-o SendEnv=GIT_PROTOCOL'Brandon Williams, Aug 24, 2017
  15. Junio C HamanoAug 25, 2017
  16. Stefan BellerAug 25, 2017
  17. Junio C HamanoAug 25, 2017
  18. Jeff KingAug 25, 2017
  19. Jeff KingAug 25, 2017
  20. Jonathan NiederAug 25, 2017
  21. Jeff KingAug 25, 2017
  22. Brandon WilliamsAug 25, 2017
  23. Jeff HostetlerAug 29, 2017
  24. Brandon WilliamsAug 29, 2017
  25. Jeff KingAug 30, 2017
  26. Jeff HostetlerAug 30, 2017
  27. Brandon WilliamsAug 30, 2017
  28. Junio C HamanoAug 25, 2017
  29. Bryan TurnerAug 30, 2017
  30. Brandon WilliamsAug 30, 2017
  31. Bryan TurnerSep 1, 2017

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.