From: Johannes Schindelin Date: Thu, 17 May 2018 21:47:06 +0000 (+0200) Subject: config: a user-provided invalid section is not a BUG X-Git-Tag: v2.18.0-rc0~9^2 X-Git-Url: https://git.lorimer.id.au/gitweb.git/diff_plain/438a87d1e25fa6715f38e30ee394d34e71d44acb?ds=inline;hp=--cc 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 Signed-off-by: Junio C Hamano --- 438a87d1e25fa6715f38e30ee394d34e71d44acb diff --git a/config.c b/config.c index d4527beb44..0205052978 100644 --- a/config.c +++ b/config.c @@ -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 =