diff options
author | Stefan Beller <sbeller@google.com> | 2018-08-08 12:50:19 -0700 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2018-08-08 13:26:48 -0700 |
commit | 2d84f13dcb67762c2506e71232556e196f32600b (patch) | |
tree | 52dbde7d3b1ef1a4e7793ce623d441078c70a016 /Documentation/CodingGuidelines | |
parent | t1300: document current behavior of setting options (diff) | |
download | tgif-2d84f13dcb67762c2506e71232556e196f32600b.tar.xz |
config: fix case sensitive subsection names on writing
A user reported a submodule issue regarding a section mix-up,
but it could be boiled down to the following test case:
$ git init test && cd test
$ git config foo."Bar".key test
$ git config foo."bar".key test
$ tail -n 3 .git/config
[foo "Bar"]
key = test
key = test
Sub sections are case sensitive and we have a test for correctly reading
them. However we do not have a test for writing out config correctly with
case sensitive subsection names, which is why this went unnoticed in
6ae996f2acf (git_config_set: make use of the config parser's event
stream, 2018-04-09)
Unfortunately we have to make a distinction between old style configuration
that looks like
[foo.Bar]
key = test
and the new quoted style as seen above. The old style is documented as
case-agnostic, hence we need to keep 'strncasecmp'; although the
resulting setting for the old style config differs from the configuration.
That will be fixed in a follow up patch.
Reported-by: JP Sugarbroad <jpsugar@google.com>
Signed-off-by: Stefan Beller <sbeller@google.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'Documentation/CodingGuidelines')
0 files changed, 0 insertions, 0 deletions