From: Junio C Hamano <gitster@pobox.com>
To: Jeff King <peff@peff.net>
Cc: git@vger.kernel.org
Subject: Re: [PATCH/RFC] ignore unknown color configuration
Date: Sat, 12 Dec 2009 13:45:45 -0800 [thread overview]
Message-ID: <7vzl5nn9x2.fsf@alter.siamese.dyndns.org> (raw)
In-Reply-To: 20091212122524.GA17547@coredump.intra.peff.net
Jeff King <peff@peff.net> writes:
> When parsing the config file, if there is a value that is
> syntactically correct but unused, we generally ignore it.
> This lets non-core porcelains store arbitrary information in
> the config file, and it means that configuration files can
> be shared between new and old versions of git (the old
> versions might simply ignore certain configuration).
>
> The one exception to this is color configuration; if we
> encounter a color.{diff,branch,status}.$slot variable, we
> die if it is not one of the recognized slots (presumably as
> a safety valve for user misconfiguration).
This reminds me of the issue an earlier patch with a good intention but a
horrible consequence wanted to address.
http://thread.gmane.org/gmane.comp.version-control.git/125925/focus=127629
> This patch loosens the check to match the rest of
> git-config; unknown color slots are simply ignored.
I am of two minds, even though I am slightly in favor than against the
change.
This is a sane thing to do, as "slot" is part of the name of the variable,
and we generally do not warn upon seeing a misspelled variable name (it
makes it worse that "func" is not even misspelled but merely unknown to
older version of git in your scenario).
On the other hand, I suspect that most people would apprecfiate if their
git pointed out "diff.color.finc? What do you mean?" before they waste
30 minutes wondering why the new feature in 1.6.6 does not work for them.
next prev parent reply other threads:[~2009-12-13 1:29 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-12-12 12:25 [PATCH/RFC] ignore unknown color configuration Jeff King
2009-12-12 21:45 ` Junio C Hamano [this message]
2009-12-12 22:20 ` Jeff King
2009-12-14 2:33 ` Junio C Hamano
2009-12-16 1:25 ` Junio C Hamano
2009-12-16 3:45 ` Jeff King
2009-12-16 1:29 ` Junio C Hamano
2009-12-16 3:46 ` Jeff King
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=7vzl5nn9x2.fsf@alter.siamese.dyndns.org \
--to=gitster@pobox.com \
--cc=git@vger.kernel.org \
--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