diff options
author | Jonathan Nieder <jrnieder@gmail.com> | 2019-12-24 02:04:15 +0100 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2020-01-15 23:03:55 +0100 |
commit | 684ceae32dae726c6a5c693b257b156926aba8b7 (patch) | |
tree | 4272769cd3d53d4c966f460eb5813378e4ef115d | |
parent | protocol test: let protocol.version override GIT_TEST_PROTOCOL_VERSION (diff) | |
download | git-684ceae32dae726c6a5c693b257b156926aba8b7.tar.xz git-684ceae32dae726c6a5c693b257b156926aba8b7.zip |
fetch: default to protocol version 2
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 bump 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.) The protocol change is backward
compatible, so this should produce no significant effect when
contacting servers that only speak protocol v0.
Signed-off-by: Jonathan Nieder <jrnieder@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
-rw-r--r-- | Documentation/config/protocol.txt | 2 | ||||
-rw-r--r-- | protocol.c | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/Documentation/config/protocol.txt b/Documentation/config/protocol.txt index 0b40141613..756591d77b 100644 --- a/Documentation/config/protocol.txt +++ b/Documentation/config/protocol.txt @@ -48,7 +48,7 @@ protocol.version:: If set, clients will attempt to communicate with a server using the specified protocol version. If the server does not support it, communication falls back to version 0. - If unset, the default is `0`. + If unset, the default is `2`. Supported versions: + -- diff --git a/protocol.c b/protocol.c index d390391eba..803bef5c87 100644 --- a/protocol.c +++ b/protocol.c @@ -39,7 +39,7 @@ enum protocol_version get_protocol_version_config(void) return env; } - return protocol_v0; + return protocol_v2; } enum protocol_version determine_protocol_version_server(void) |