Skip to content

Advertise multiple supported proto versions

Josh Steadmon git 5 versions – In review

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v6 Latest1 patch 3 repliesIn review
  2. v51 patch 4 repliesSuperseded
  3. v41 patch 3 repliesSuperseded
Earlier versions · 2
VersionPostedPatchesRepliesStatus
v31 patch16 repliesSuperseded
v21 patch3 repliesSuperseded

Patches in v6 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/1protocol: advertise multiple supported versionsbuiltin/archive.c builtin/clone.c builtin/fetch-pack.c +18 more+256 -823 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v6 yet.

Read the v6 thread

Cover letter [PATCH v6 0/1] Advertise multiple supported proto versions

Add a registry of supported wire protocol versions that individual commands can use to declare supported versions before contacting a server. The client will then advertise all supported versions, while the server will choose the first allowed version from the advertised list.

Every command that acts as a client or server must now register its supported protocol versions.

Changes since V4: remove special cases around advertising version=0.

Changes since V5: no code changes, but corrected and clarified commit
message regarding changes around advertising version=0.

Josh Steadmon (1):
protocol: advertise multiple supported versions

 builtin/archive.c           |   3 +
 builtin/clone.c             |   4 ++
 builtin/fetch-pack.c        |   4 ++
 builtin/fetch.c             |   5 ++
 builtin/ls-remote.c         |   5 ++
 builtin/pull.c              |   5 ++
 builtin/push.c              |   4 ++
 builtin/receive-pack.c      |   3 +
 builtin/send-pack.c         |   3 +
 builtin/upload-archive.c    |   3 +
 builtin/upload-pack.c       |   4 ++
 connect.c                   |  52 +++++++--------
 protocol.c                  | 122 +++++++++++++++++++++++++++++++++---
 protocol.h                  |  23 ++++++-
 remote-curl.c               |  27 +++++---
 t/t5551-http-fetch-smart.sh |   1 +
 t/t5570-git-daemon.sh       |   2 +-
 t/t5601-clone.sh            |  38 +++++------
 t/t5700-protocol-v1.sh      |   8 +--
 t/t5702-protocol-v2.sh      |  16 +++--
 transport-helper.c          |   6 ++
 21 files changed, 256 insertions(+), 82 deletions(-)

Range-diff against v5:
1: 60f6f2fbd8 ! 1: 10039ca163 protocol: advertise multiple supported versions
@@ -22,10 +22,12 @@
select the first allowed version from this advertisement.

Additionally, remove special cases around advertising version=0.
- Previously we avoided adding version negotiation fields in server
- responses if it looked like the client wanted v0. However, including
- these fields does not change behavior, so it's better to have simpler
- code.
+ Previously we avoided adding version advertisements to the client's
+ initial connection request if the client wanted version=0. However,
+ including these advertisements does not change the version negotiation
+ behavior, so it's better to have simpler code. As a side effect, this
+ means that client operations over SSH will always include a
+ "SendEnv=GIT_PROTOCOL" option on the SSH command line.

While we're at it, remove unnecessary externs from function declarations in protocol.h.

Signature · 1 line
2.20.1.415.g653613c723-goog