Re: [PATCH] config: preserve <subsection> case for one-shot config on the command line
- From
Junio C Hamano <gitster@pobox.com>
- Date
- Feb 16, 2017, 16:59 UTC
- Message-ID
- <xmqqlgt6ysum.fsf@gitster.mtv.corp.google.com>
- In-Reply-To
- <D0CDD1AC-05CA-47F3-8CB5-61EA1C6515A8@gmail.com>
Lars Schneider <larsxschneider@gmail.com> writes:
Show 6 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
Yuck.
> But your patch below fixes that, too!
Heh.
> Should we add a test case to this patch? > If not, do you want me to improve my test case patch [1] > or do you want to ditch the test?
I think a new test for submodule (although it already exists thanks t you) is a bit too roundabout way to demonstrate the breakage and protect the fix.
We'd perhaps want some tests for "git config", probably.
In a repository with /etc/gitconfig and $HOME/ that are tightly controlled (I think our test framework already do so), running these would demonstrate both breakages, I would think, but I am sure people can come up with other forms that are a lot easier to read..
$ git -c v.A.r=val -c v.a.r=ue config --get-all v.a.r
$ git -c v.A.r=val -c v.a.r=ue config --get-all v.A.r
$ git -c v.a.r=val -c v.A.r=ue config --get-all v.a.r
$ git -c v.a.r=val -c v.A.r=ue config --get-all v.A.rThanks.