mbox series

[0/5] Enable protocol v2 by default

Message ID 20191224005816.GC38316@google.com (mailing list archive)
Headers show
Series Enable protocol v2 by default | expand

Message

Jonathan Nieder Dec. 24, 2019, 12:58 a.m. UTC
Hi,

The Git users at $DAYJOB have been using protocol v2 as a default for
~1.5 years now and others have been also reporting good experiences
with it, so it seems like a good time to propose bumping the default
version.  It produces a significant performance improvement when
fetching from repositories with many refs, such as
https://chromium.googlesource.com/chromium/src.

This only affects the client, not the server.  (The server already
defaults to supporting protocol v2.)

This could go in 2.25 (most of the "next" population is likely already
using protocol.version=2, so the -rc period would be one of the better
ways to expand the user population using this) or could cook in "next"
for a cycle.  Either is fine by me.

Thoughts of all kinds welcome, as always.

Jonathan Nieder (5):
  fetch test: use more robust test for filtered objects
  config doc: protocol.version is not experimental
  test: request GIT_TEST_PROTOCOL_VERSION=0 when appropriate
  protocol test: let protocol.version override GIT_TEST_PROTOCOL_VERSION
  fetch: default to protocol version 2

 Documentation/config/protocol.txt    |  9 ++++-----
 protocol.c                           | 11 +++++------
 t/README                             |  4 ++--
 t/t5400-send-pack.sh                 |  2 +-
 t/t5500-fetch-pack.sh                | 23 ++++++++++++++++-------
 t/t5512-ls-remote.sh                 | 10 +++++-----
 t/t5515-fetch-merge-logic.sh         |  3 ++-
 t/t5516-fetch-push.sh                | 12 ++++++------
 t/t5539-fetch-http-shallow.sh        |  2 +-
 t/t5541-http-push-smart.sh           |  4 ++--
 t/t5551-http-fetch-smart.sh          | 12 ++++++------
 t/t5552-skipping-fetch-negotiator.sh |  2 +-
 t/t5700-protocol-v1.sh               |  3 ++-
 t/t7406-submodule-update.sh          |  2 +-
 14 files changed, 54 insertions(+), 45 deletions(-)

base-commit: 12029dc57db23baef008e77db1909367599210ee

Comments

Derrick Stolee Dec. 26, 2019, 2:30 p.m. UTC | #1
On 12/23/2019 7:58 PM, Jonathan Nieder wrote:
> Hi,
> 
> The Git users at $DAYJOB have been using protocol v2 as a default for
> ~1.5 years now and others have been also reporting good experiences
> with it, so it seems like a good time to propose bumping the default
> version.  It produces a significant performance improvement when
> fetching from repositories with many refs, such as
> https://chromium.googlesource.com/chromium/src.

The benefits of protocol v2 are very clear, assuming the server
supports it. And I'm pretty sure there is no downside, as a v0
server continues responding to the v2 request without any extra
round trips to agree on protocol.

> This only affects the client, not the server.  (The server already
> defaults to supporting protocol v2.)
> 
> This could go in 2.25 (most of the "next" population is likely already
> using protocol.version=2, so the -rc period would be one of the better
> ways to expand the user population using this) or could cook in "next"
> for a cycle.  Either is fine by me.

I have no firm opinion on when this lands. The code change is much simpler
than I would have thought, and perhaps we had enough testing of the protocol
by experts.

This series looks good to me.

Thanks,
-Stolee