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

Re: Protocol v2 in v2.27 (Re: Re* [ANNOUNCE] Git v2.27.0-rc1)

From
Junio C Hamano <gitster@pobox.com>
Date
May 20, 2020, 23:59 UTC
Message-ID
<xmqqlflmtaxq.fsf@gitster.c.googlers.com>
In-Reply-To
<20200520220023.GB3648@google.com>
Jonathan Nieder <jrnieder@gmail.com> writes:
> Speaking of which, should we enable protocol v2 by default for people
> with feature.experimental enabled, like this?

It is an excellent idea, but is something that had to have been proposed before -rc0 to be in the upcoming release, no?

The patch looks good; do we have the master list of things that are under control of feature.experimental knob in the documentation, or is it a feature that we do not have to have a centralized control?

Show 36 quoted lines
> diff --git c/Documentation/config/protocol.txt i/Documentation/config/protocol.txt
> index 0b40141613e..c46e9b3d00a 100644
> --- c/Documentation/config/protocol.txt
> +++ i/Documentation/config/protocol.txt
> @@ -48,7 +48,8 @@ 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 `0`, unless `feature.experimental`
> +	is enabled, in which case the default is `2`.
>  	Supported versions:
>  +
>  --
> diff --git c/protocol.c i/protocol.c
> index d390391ebac..d1dd3424bba 100644
> --- c/protocol.c
> +++ i/protocol.c
> @@ -17,6 +17,7 @@ static enum protocol_version parse_protocol_version(const char *value)
>  enum protocol_version get_protocol_version_config(void)
>  {
>  	const char *value;
> +	int val;
>  	const char *git_test_k = "GIT_TEST_PROTOCOL_VERSION";
>  	const char *git_test_v;
>  
> @@ -30,6 +31,9 @@ enum protocol_version get_protocol_version_config(void)
>  		return version;
>  	}
>  
> +	if (!git_config_get_bool("feature.experimental", &val) && val)
> +		return protocol_v2;
> +
>  	git_test_v = getenv(git_test_k);
>  	if (git_test_v && *git_test_v) {
>  		enum protocol_version env = parse_protocol_version(git_test_v);
Previous: Jonathan NiederNext: Jeff King
Message 7 of 15 in “[ANNOUNCE] Git v2.27.0-rc1”
  1. Junio C HamanoMay 20, 2020
  2. Jeff KingMay 20, 2020
  3. Junio C HamanoMay 20, 2020
  4. Re* [ANNOUNCE] Git v2.27.0-rc1Junio C Hamano, May 20, 2020
  5. Jeff KingMay 20, 2020
  6. Protocol v2 in v2.27 (Re: Re* [ANNOUNCE] Git v2.27.0-rc1)Jonathan Nieder, May 20, 2020
  7. Junio C HamanoMay 20, 2020
  8. Jeff KingMay 21, 2020
  9. Jonathan NiederMay 21, 2020
  10. Carlo Marcelo Arenas BelónMay 21, 2020
  11. Jonathan NiederMay 21, 2020
  12. Carlo Marcelo Arenas BelónMay 21, 2020
  13. Derrick StoleeMay 21, 2020
  14. Junio C HamanoMay 21, 2020
  15. Junio C HamanoMay 21, 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.