git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Junio C Hamano <gitster@pobox.com>
To: Jonathan Nieder <jrnieder@gmail.com>
Cc: git@vger.kernel.org, Brandon Williams <bmwill@google.com>,
	Jeff King <peff@peff.net>
Subject: Re: [PATCH] protocol: treat unrecognized protocol.version setting as 0
Date: Wed, 28 Feb 2018 09:53:11 -0800	[thread overview]
Message-ID: <xmqqbmg9m260.fsf@gitster-ct.c.googlers.com> (raw)
In-Reply-To: <20180228005059.GA251290@aiede.svl.corp.google.com> (Jonathan Nieder's message of "Tue, 27 Feb 2018 16:50:59 -0800")

Jonathan Nieder <jrnieder@gmail.com> writes:

> 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).


  parent reply	other threads:[~2018-02-28 17:53 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-02-28  0:50 [PATCH] protocol: treat unrecognized protocol.version setting as 0 Jonathan Nieder
2018-02-28  1:02 ` Brandon Williams
2018-02-28  1:10   ` Duy Nguyen
2018-02-28  1:16     ` Brandon Williams
2018-02-28  1:22     ` Jonathan Nieder
2018-02-28 17:55       ` Junio C Hamano
2018-02-28 18:06         ` Junio C Hamano
2018-02-28 17:53 ` Junio C Hamano [this message]
2018-02-28 18:07   ` Jonathan Nieder

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=xmqqbmg9m260.fsf@gitster-ct.c.googlers.com \
    --to=gitster@pobox.com \
    --cc=bmwill@google.com \
    --cc=git@vger.kernel.org \
    --cc=jrnieder@gmail.com \
    --cc=peff@peff.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).