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

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

From
JTJonathan Tan <jonathantanmy@google.com>
Date
Nov 3, 2020, 00:26 UTC
Message-ID
<cover.1604362701.git.jonathantanmy@google.com>

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
-- 
2.29.1.341.ge80a0c044ae-goog
Next: Jonathan Tan
Message 1 of 21 in “"Push" protocol change proposal: user-specified base”
  1. 0/4 "Push" protocol change proposal: user-specified baseJonathan Tan, Nov 3, 2020
  2. 1/4 connect: refactor building of Extra ParametersJonathan Tan, Nov 3, 2020
  3. 2/4 push: teach --base for ssh:// and file://Jonathan Tan, Nov 3, 2020
  4. SZEDER GáborNov 3, 2020
  5. Junio C HamanoNov 8, 2020
  6. Derrick StoleeNov 3, 2020
  7. Junio C HamanoNov 8, 2020
  8. 3/4 remote-curl: teach --base for http(s)://Jonathan Tan, Nov 3, 2020
  9. Junio C HamanoNov 3, 2020
  10. 4/4 Doc: push with --baseJonathan Tan, Nov 3, 2020
  11. Jonathan NiederNov 3, 2020
  12. Jeff KingNov 3, 2020
  13. Junio C HamanoNov 3, 2020
  14. Jonathan TanNov 9, 2020
  15. Derrick StoleeNov 9, 2020
  16. Jonathan TanNov 9, 2020
  17. Junio C HamanoNov 9, 2020
  18. Jeff KingNov 9, 2020
  19. Jonathan TanNov 9, 2020
  20. Derrick StoleeNov 3, 2020
  21. Junio C HamanoNov 3, 2020

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.