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

Re: [PATCH] protocol: treat unrecognized protocol.version setting as 0

From
Junio C Hamano <gitster@pobox.com>
Date
Feb 28, 2018, 17:53 UTC
Message-ID
<xmqqbmg9m260.fsf@gitster-ct.c.googlers.com>
In-Reply-To
<20180228005059.GA251290@aiede.svl.corp.google.com>
Jonathan Nieder <jrnieder@gmail.com> writes:
Show 14 quoted lines
> If I share my .gitconfig or .git/config file between multiple machines
> (or between multiple Git versions on a single machine) and set
>
> 	[protocol]
> 		version = 2
>
> then running "git fetch" with a Git version that does not support
> protocol v2 errors out with
>
> 	fatal: unknown value for config 'protocol.version': 2
>
> In the spirit of v1.7.6-rc0~77^2~1 (Improve error handling when
> parsing dirstat parameters, 2011-04-29), it is better to (perhaps
> after warning the user) ignore the unrecognized protocol version.
I do not agree with the analogy at all.  

Showing dirstat with different tweaks than the user expected to see is a local and read-only thing. Talking to the other side over a protocol the user explicitly wanted to avoid (e.g. imagine the case where your upstream's protocol version 1 implementation is critically buggy and you want to use version 2 if you talk with them) by accident is a more grave error, possibly affecting the other side that you may not have enough power to recover from (e.g. damaging the remote repository to which you only have push access and not interactive shell).

Previous: Junio C HamanoNext: Jonathan Nieder
Message 8 of 9 in “protocol: treat unrecognized protocol.version setting as 0”
  1. protocol: treat unrecognized protocol.version setting as 0Jonathan Nieder, Feb 28, 2018
  2. Brandon WilliamsFeb 28, 2018
  3. Duy NguyenFeb 28, 2018
  4. Brandon WilliamsFeb 28, 2018
  5. Jonathan NiederFeb 28, 2018
  6. Junio C HamanoFeb 28, 2018
  7. Junio C HamanoFeb 28, 2018
  8. Junio C HamanoFeb 28, 2018
  9. Jonathan NiederFeb 28, 2018

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.