git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: David Aguilar <davvid@gmail.com>
To: Jeff King <peff@peff.net>
Cc: Junio C Hamano <gitster@pobox.com>,
	Jeremy White <jwhite@winehq.org>,
	git@vger.kernel.org
Subject: Re: [PATCH] Generate a warning message if we find an unrecognized option.
Date: Mon, 8 Feb 2010 21:17:31 -0800	[thread overview]
Message-ID: <20100209051730.GA28599@gmail.com> (raw)
In-Reply-To: <20100209030151.GA5370@coredump.intra.peff.net>

On Mon, Feb 08, 2010 at 10:01:51PM -0500, Jeff King wrote:
> On Mon, Feb 08, 2010 at 04:59:12PM -0800, Junio C Hamano wrote:
> 
> > > And obviously that is weighed against the ability to notice things like
> > > typos. But if we are going to start complaining about unknown config, we
> > > would probably do better to complain about _all_ unknown config, and not
> > > just this one subsection.

No, please, please no.


> So in practice I think you will get quite spotty coverage. Which isn't
> to say it isn't necessarily worth doing, but I am personally not very
> excited about working on it. I do like the suggestion of making it
> optional, so that people who don't care about having a portable config
> can have the benefit of sanity-checking their config.
> 
> I would rather have a "git config --lint" command, but that is even
> harder, since we are not even loading most of the subsystems which know
> about the valid config options. And it presupposes that people will
> bother to actually run such a lint command.

This runs up against the same issue you pointed out
earlier--that older versions of git cannot adequately lint
configs from newer versions.

There are also config variables from unknown git scripts outside
of git.git that happen to use the git-config mechanism because
it is convenient.  It would be unfortunate to punish those who
chose to make up their own config variables by warning them
that git doesn't know about them.

I have to wonder if this is a non-existent problem.

Config variables are one-shot things.  You set them and forget
about them.  When you set it you are usually pretty well aware
of whether it's typoed because it simply does't work.
color.ui is a perfect example.  If it's typoed, you don't need
'git config --lint' to tell you, you already know by virtue of
using the thing.

Maintaining 'git config --lint' would also be a PITA since we'd
then have to remember to update yet another place in addition to
code and documentation.  And who's to say what gets to be "in"
and what doesn't?  git-gui, for example, has its own [gui]
namespace.  git-p4 has its own [git-p4] namespace, but it
lives in contrib/, etc. etc.

This seems like a bad idea to me.

-- 
		David

  reply	other threads:[~2010-02-09  5:18 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-02-08 22:33 [PATCH] Generate a warning message if we find an unrecognized option Jeremy White
2010-02-09  0:45 ` Jeff King
2010-02-09  0:59   ` Junio C Hamano
2010-02-09  3:01     ` Jeff King
2010-02-09  5:17       ` David Aguilar [this message]
2010-02-09  5:59         ` 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=20100209051730.GA28599@gmail.com \
    --to=davvid@gmail.com \
    --cc=git@vger.kernel.org \
    --cc=gitster@pobox.com \
    --cc=jwhite@winehq.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;
as well as URLs for NNTP newsgroup(s).