From: Jeff King <peff@peff.net>
To: David Aguilar <davvid@gmail.com>
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: Tue, 9 Feb 2010 00:59:38 -0500 [thread overview]
Message-ID: <20100209055938.GA14736@coredump.intra.peff.net> (raw)
In-Reply-To: <20100209051730.GA28599@gmail.com>
On Mon, Feb 08, 2010 at 09:17:31PM -0800, David Aguilar 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.
I would only be OK with it if it were optional.
> > 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.
Yeah, but that isn't a big deal. You just don't run "config --lint" with
the older version. But if, for example, "git diff" breaks because your
config is too new, then that is a real pain (and that was what happened
with color.diff.func recently).
> 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.
Yes, I don't think anyone is proposing to lint _all_ variables. But it
does not seem unreasonable for certain subsystems to claim portions of
the namespace. I would expect git-core to own "core.*". And I would
expect git-gui to own "git-gui", etc.
> 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.
I think I agree with you on this. It is _much_ more annoying to me not
to have version portability than it is not to have strict config
checking. I was mainly trying to put myself in the shoes of "regular"
users, who are less likely to be running the same config file on many
different versions, and are more likely to be clueless about config. But
I may have overcompensated.
-Peff
prev parent reply other threads:[~2010-02-09 5:59 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
2010-02-09 5:59 ` Jeff King [this message]
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=20100209055938.GA14736@coredump.intra.peff.net \
--to=peff@peff.net \
--cc=davvid@gmail.com \
--cc=git@vger.kernel.org \
--cc=gitster@pobox.com \
--cc=jwhite@winehq.org \
/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).