Skip to content

Commit 438a87d

Browse files
dschogitster
authored andcommitted
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 <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent c71d8bb commit 438a87d

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

config.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2329,7 +2329,7 @@ static int store_aux_event(enum config_event_t type,
23292329

23302330
if (type == CONFIG_EVENT_SECTION) {
23312331
if (cf->var.len < 2 || cf->var.buf[cf->var.len - 1] != '.')
2332-
BUG("Invalid section name '%s'", cf->var.buf);
2332+
return error("invalid section name '%s'", cf->var.buf);
23332333

23342334
/* Is this the section we were looking for? */
23352335
store->is_keys_section =

0 commit comments

Comments
 (0)