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

Re: [RFC/WIP PATCH 08/11] transport: connect_setup appends protocol version number

From
Stefan Beller <sbeller@google.com>
Date
May 26, 2015, 22:31 UTC
Message-ID
<CAGZ79kY=hZ=6pUbpVHUW8rU3AEMx2TwkBYDsDsZ+bPH_QnsYzA@mail.gmail.com>
In-Reply-To
<xmqq1ti3j7ym.fsf@gitster.dls.corp.google.com>
On Tue, May 26, 2015 at 3:21 PM, Junio C Hamano <gitster@pobox.com> wrote:
Show 13 quoted lines
> Stefan Beller <sbeller@google.com> writes:
>
>> +     if (transport->smart_options
>> +         && transport->smart_options->transport_version) {
>> +             buf = xmalloc(strlen(remote_program) + 12);
>> +             sprintf(buf, "%s-%d", remote_program,
>> +                     transport->smart_options->transport_version);
>> +             remote_program = buf;
>> +     }
>
> Bikeshedding: so the versioning scheme is that the current one is
> zero, and the next one is two?  I would have expected that there
> would be something like

I think currently we have version 1. But we don't advertise it, so I'll call it 0 (the default or unadvertised or however you name it. 0 as in "unsure" maybe)

I thought about future proofing this version a bit. Say version 2 is bad because I don't have the experience of 10 years Git nor of maintaining large projects and you want to make a version 3 soon. And this would support that just fine.

The meaning being: Any version except 0 should have a dedicated extension -${version} The 0 is left out for backwards compatibility.

So in a later patch where we want to introduce force-using of old versions you could configure upload-pack to be explicit upload-pack-1. The upload-pack-1 version is not yet there with this series though.

Show 6 quoted lines
>
>         if (...->version < 2) {
>                 ... append "-%d" ...
>         }
>
> involved.

Oh! I see here you would count the current one as 1, which has no number extension, and any further would have a -${version}. That would transport the intention much better I guess.

Previous: Junio C HamanoNext: Junio C Hamano
Message 35 of 61 in “Protocol version 2, again!”
  1. 00/11 Protocol version 2, again!Stefan Beller, May 26, 2015
  2. 01/11 upload-pack: make client capability parsing code a separate functionStefan Beller, May 26, 2015
  3. 02/11 upload-pack: only accept capabilities on the first "want" lineStefan Beller, May 26, 2015
  4. Junio C HamanoMay 26, 2015
  5. Stefan BellerMay 26, 2015
  6. 03/11 upload-pack: move capabilities out of send_refStefan Beller, May 26, 2015
  7. 04/11 upload-pack-2: Implement the version 2 of upload-packStefan Beller, May 26, 2015
  8. Eric SunshineMay 27, 2015
  9. Jeff KingMay 27, 2015
  10. Eric SunshineMay 27, 2015
  11. Jeff KingMay 27, 2015
  12. Stefan BellerMay 27, 2015
  13. Jeff KingMay 27, 2015
  14. Stefan BellerMay 27, 2015
  15. Jeff KingMay 27, 2015
  16. 05/11 transport: add infrastructure to support a protocol version numberStefan Beller, May 26, 2015
  17. Jeff KingMay 27, 2015
  18. Stefan BellerMay 27, 2015
  19. Jeff KingMay 27, 2015
  20. Junio C HamanoMay 27, 2015
  21. 06/11 remote.h: add get_remote_capabilities, request_capabilitiesStefan Beller, May 26, 2015
  22. Eric SunshineMay 27, 2015
  23. Jeff KingMay 27, 2015
  24. Eric SunshineMay 27, 2015
  25. Jeff KingMay 27, 2015
  26. Jeff KingMay 27, 2015
  27. Stefan BellerMay 29, 2015
  28. Jeff KingMay 29, 2015
  29. 07/11 fetch-pack: use the configured transport protocolStefan Beller, May 26, 2015
  30. Junio C HamanoMay 26, 2015
  31. Stefan BellerMay 26, 2015
  32. Jeff KingMay 27, 2015
  33. 08/11 transport: connect_setup appends protocol version numberStefan Beller, May 26, 2015
  34. Junio C HamanoMay 26, 2015
  35. Stefan BellerMay 26, 2015
  36. Junio C HamanoMay 27, 2015
  37. Jeff KingMay 27, 2015
  38. Eric SunshineMay 27, 2015
  39. Jeff KingMay 27, 2015
  40. 09/11 transport: get_refs_via_connect exchanges capabilities before refs.Stefan Beller, May 26, 2015
  41. Eric SunshineMay 27, 2015
  42. Jeff KingMay 27, 2015
  43. 10/11 t5544: add a test case for the new protocolStefan Beller, May 26, 2015
  44. Eric SunshineMay 27, 2015
  45. Jeff KingMay 27, 2015
  46. 11/11 Document protocol version 2Stefan Beller, May 26, 2015
  47. Junio C HamanoMay 29, 2015
  48. Stefan BellerMay 29, 2015
  49. Junio C HamanoMay 29, 2015
  50. Jeff KingMay 29, 2015
  51. Stefan BellerJun 1, 2015
  52. Stefan BellerJun 1, 2015
  53. Jeff KingJun 4, 2015
  54. Junio C HamanoJun 4, 2015
  55. Junio C HamanoJun 2, 2015
  56. Jeff KingMay 27, 2015
  57. Jeff KingMay 27, 2015
  58. Stefan BellerJun 1, 2015
  59. Duy NguyenJun 2, 2015
  60. Jeff KingJun 4, 2015
  61. Stefan BellerJun 4, 2015

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.