Re: [PATCH] Sanity-ckeck config variable names
- From
Jeff King <peff@peff.net>
- Date
- Jan 21, 2011, 00:06 UTC
- Message-ID
- <20110121000629.GA7773@sigill.intra.peff.net>
- In-Reply-To
- <20110120232232.GA9442@sigill.intra.peff.net>
On Thu, Jan 20, 2011 at 06:22:32PM -0500, Jeff King wrote:
> Other than that, the code looks OK to me.
Actually, I take this back.
Doesn't this hunk:
Show 8 quoted lines
> @@ -168,10 +167,6 @@ static int get_value(const char *key_, const char *regex_) > } > > key = xstrdup(key_); > - for (tl=key+strlen(key)-1; tl >= key && *tl != '.'; --tl) > - *tl = tolower(*tl); > - for (tl=key; *tl && *tl != '.'; ++tl) > - *tl = tolower(*tl);
Mean that regexp keys no longer get downcased properly? I.e.,
git config Foo.value true git config --get-regexp 'foo.*' git config --get-regexp 'Foo.*'
used to work for both lookups, but now fails for the second one?
The problem is that your git_config_parse_key handles the downcasing for the non-regexp case, but it is not called (for obvious reasons) in the regexp case.
-Peff