From: Junio C Hamano Date: Mon, 20 Aug 2018 19:41:32 +0000 (-0700) Subject: Merge branch 'sb/config-write-fix' X-Git-Tag: v2.19.0-rc0~7 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=2a2c18f1c3ae3fbade32df11719f24e8d6a6709c;p=thirdparty%2Fgit.git Merge branch 'sb/config-write-fix' Recent update to "git config" broke updating variable in a subsection, which has been corrected. * sb/config-write-fix: git-config: document accidental multi-line setting in deprecated syntax config: fix case sensitive subsection names on writing t1300: document current behavior of setting options --- 2a2c18f1c3ae3fbade32df11719f24e8d6a6709c diff --cc config.c index f97ea34756,27e800c7ce..9a0b10d4bc --- a/config.c +++ b/config.c @@@ -2370,9 -2331,16 +2373,16 @@@ static int store_aux_event(enum config_ store->parsed[store->parsed_nr].type = type; if (type == CONFIG_EVENT_SECTION) { + int (*cmpfn)(const char *, const char *, size_t); + if (cf->var.len < 2 || cf->var.buf[cf->var.len - 1] != '.') - return error("invalid section name '%s'", cf->var.buf); + return error(_("invalid section name '%s'"), cf->var.buf); + if (cf->subsection_case_sensitive) + cmpfn = strncasecmp; + else + cmpfn = strncmp; + /* Is this the section we were looking for? */ store->is_keys_section = store->parsed[store->parsed_nr].is_keys_section =