Re: [BUG] submodule config does not apply to upper case submodules?
- From
- Jonathan Tan <jonathantanmy@google.com>
- Date
- Feb 15, 2017, 22:54 UTC
- Message-ID
- <f238248f-0df2-19a5-581d-95c8a61b4632@google.com>
- In-Reply-To
- <xmqqzihn2smp.fsf@gitster.mtv.corp.google.com>
On 02/15/2017 10:53 AM, Junio C Hamano wrote:
Show 13 quoted lines
> Lars Schneider <larsxschneider@gmail.com> writes:
>
>> It looks like as if submodule configs ("submodule.*") for submodules
>> with upper case names are ignored.
>
> This observation is surprising, as the second level in three-level
> names like "<section>.<name>.<variable>" is designed to be case
> sensitive. A code that uses the config API needs to do extra things
> to cause the behaviour you showed, i.e. to get submodule.U.update
> ignored while submodule.l.update to be honoured. Perhaps somebody
> downcases things too aggressively before comparing?
>
> This is worth making it work as expected, needless to say ;-)I had some time to look into this, and yes, command-line parameters are too aggressively downcased ("git_config_parse_parameter" calls "strbuf_tolower" on the entire key part in config.c). Updating the original patch to use "test_global_config" makes the test pass, and commenting out the "strbuf_tolower" line in config.c also makes the test pass.
I'll see if I can fix this.