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 -- To unsubscribe from this list: send the line "unsubscribe git" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html