Skip to content

"Push" protocol change proposal: user-specified base

Jonathan Tan git 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest4 patches 16 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/4connect: refactor building of Extra Parametersconnect.c+18 -130 replies
2/4push: teach --base for ssh:// and file://builtin/fetch-pack.c builtin/push.c builtin/receive-pack.c +10 more+175 -164 replies
3/4remote-curl: teach --base for http(s)://Documentation/gitremote-helpers.txt remote-curl.c t/t5700-protocol-v1.sh +1 more+71 -71 reply
4/4Doc: push with --baseDocumentation/technical/pack-protocol.txt Documentation/technical/push-with-base.txt+68 -310 replies

Reviews trailers per patch

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

Read the v1 thread

Cover letter [PATCH 0/4] "Push" protocol change proposal: user-specified base

At $DAY_JOB, we've noticed some pushes being larger than necessary. Here's a first step towards solving that. In this protocol change, we're allowing the user to specify an ancestor believed to be common; if the server agrees, the server sends that ancestor as the lone so-called ref being advertised instead of the full ref advertisement. Not only does this save bandwidth for the ref advertisement, but this avoids the issue of the server's refs being ahead of the client (and thus the client cannot use them since it is unaware of those objects).

More information (including a design doc) can be found in the documentation patch.

This works for file://, ssh://, and http(s)://.

One last concern I had is the locations of the tests - I just bundled the protocol v0 ones with their corresponding protocol v1 ones, as I couldn't find good places to put them.

Jonathan Tan (4):
connect: refactor building of Extra Parameters
push: teach --base for ssh:// and file://
remote-curl: teach --base for http(s)://
Doc: push with --base

 Documentation/gitremote-helpers.txt        |   8 ++
 Documentation/technical/pack-protocol.txt  |  10 +-
 Documentation/technical/push-with-base.txt |  61 ++++++++++++
 builtin/fetch-pack.c                       |   2 +-
 builtin/push.c                             |  12 ++-
 builtin/receive-pack.c                     |  46 ++++++++-
 builtin/send-pack.c                        |   2 +-
 builtin/upload-pack.c                      |   2 +-
 connect.c                                  |  39 +++++---
 connect.h                                  |   4 +-
 http-backend.c                             |   2 +-
 protocol.c                                 |   5 +-
 protocol.h                                 |   5 +-
 remote-curl.c                              |  25 +++--
 t/t5700-protocol-v1.sh                     | 110 +++++++++++++++++++++
 transport-helper.c                         |  15 +++
 transport.c                                |  14 ++-
 transport.h                                |   9 ++
 18 files changed, 332 insertions(+), 39 deletions(-)
 create mode 100644 Documentation/technical/push-with-base.txt
Signature · 1 line
2.29.1.341.ge80a0c044ae-goog