Thread (1 message) 1 message, 1 author, 2018-08-03

Re: [PATCH 2/3] config: fix case sensitive subsection names on writing

From: Junio C Hamano <hidden>
Date: 2018-08-03 15:51:05

Stefan Beller [off-list ref] writes:
And *technically* the two level is old style, so I figured it's ok.
If we call the bit not after the recentness of the style but after
what it is about, e.g. "is the section name as a whole (including
its possible subsection part) case insensitive?", then yes, a
two-level name can be treated exactly the same way as the old style
names with a subsection.  Perhaps we should do that rename to save
us from future confusion.
quoted
quoted
-                     !strncasecmp(cf->var.buf, store->key, store->baselen);
+                     !cmpfn(cf->var.buf, store->key, store->baselen);
OK.  Section names should still be case insensitive (only the case
sensitivity of subsection names is special), but presumably that's
already normalized by the caller so we do not have to worry when we
use strncmp()?  Can we add a test to demonstrate that it works
correctly?
That was already demonstrated (but not tested) in
https://public-inbox.org/git/20180730230443.74416-4-sbeller@google.com/
Yeah, I also manually tried when I was playing with the old-style
names to see how well it works.  We would want to make sure this
won't get broken in the future, still.

Thanks.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help