1
0
mirror of https://github.com/git/git.git synced 2024-11-15 16:03:16 +01:00

config: a user-provided invalid section is not a BUG

This was pointed out by Jeff King while the empty-config-section-fix
patch series was cooking, and was not addressed in time for that patch
series to advance to `master`.

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
This commit is contained in:
Johannes Schindelin 2018-05-17 23:47:06 +02:00 committed by Junio C Hamano
parent c71d8bb38a
commit 438a87d1e2

@ -2329,7 +2329,7 @@ static int store_aux_event(enum config_event_t type,
if (type == CONFIG_EVENT_SECTION) {
if (cf->var.len < 2 || cf->var.buf[cf->var.len - 1] != '.')
BUG("Invalid section name '%s'", cf->var.buf);
return error("invalid section name '%s'", cf->var.buf);
/* Is this the section we were looking for? */
store->is_keys_section =