git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Brandon Williams <bmwill@google.com>
To: Duy Nguyen <pclouds@gmail.com>
Cc: Jonathan Nieder <jrnieder@gmail.com>,
	Git Mailing List <git@vger.kernel.org>, Jeff King <peff@peff.net>
Subject: Re: [PATCH] protocol: treat unrecognized protocol.version setting as 0
Date: Tue, 27 Feb 2018 17:16:04 -0800	[thread overview]
Message-ID: <20180228011604.GC45342@google.com> (raw)
In-Reply-To: <CACsJy8Cn2hcodoR8ksRBY9qf7MmJaP+KAzYqv6seeR9s-Be8Hw@mail.gmail.com>

On 02/28, Duy Nguyen wrote:
> On Wed, Feb 28, 2018 at 8:02 AM, Brandon Williams <bmwill@google.com> wrote:
> > On 02/27, Jonathan Nieder wrote:
> >> 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.
> >> After all, future Git versions might add even more protocol versions,
> >> and using two different Git versions with the same Git repo, machine,
> >> or home directory should not cripple the older Git version just
> >> because of a parameter that is only understood by a more recent Git
> >> version.
> 
> I wonder if it's better to specify multiple versions. If v2 is not
> recognized by this git but v0 is, then it can pick that up. But if you
> explicitly tell it to choose between v2 and v3 only and it does not
> understand either, then it dies. Not sure if this is a good idea
> though.

I mean that's definitely a possibility, but I don't think its worth the
effort to get that working until we actually need it.  I'm hoping we
really don't bump version numbers often.

-- 
Brandon Williams

  reply	other threads:[~2018-02-28  1:16 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 [this message]
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
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=20180228011604.GC45342@google.com \
    --to=bmwill@google.com \
    --cc=git@vger.kernel.org \
    --cc=jrnieder@gmail.com \
    --cc=pclouds@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).