Re: [PATCH] config: preserve <subsection> case for one-shot config on the command line
- From
Jeff King <peff@peff.net>
- Date
- Feb 16, 2017, 23:27 UTC
- Message-ID
- <20170216232730.xsx3xks5ppjws5rg@sigill.intra.peff.net>
- In-Reply-To
- <D0CDD1AC-05CA-47F3-8CB5-61EA1C6515A8@gmail.com>
On Thu, Feb 16, 2017 at 11:30:28AM +0100, Lars Schneider wrote:
Show 7 quoted lines
> > > On 16 Feb 2017, at 00:48, Junio C Hamano <gitster@pobox.com> wrote: > > > > The "git -c <var>=<val> cmd" mechanism is to pretend that a > > The problem is also present for gitconfig variables e.g. > git config --local submodule.UPPERSUB.update none
Hrm, is it?
$ git config --file foo submodule.UPPERSUB.update none $ cat foo [submodule "UPPERSUB"] update = none
I could believe that some of the submodule code may try to pass it through "-c", though, so certain config ends up being missed.
AFAICT, though, the writing code takes what you gave it verbatim. The reader is responsible for downcasing everything but the subsection before it hands it to a callback. Commands calling git-config for lookup should generally ask for the canonical downcased name. There is some code to downcase, but IIRC there are corner cases around some of the regex lookup functions.
-Peff