summaryrefslogtreecommitdiff
path: root/config.c
diff options
context:
space:
mode:
authorJohannes Schindelin <johannes.schindelin@gmx.de>2018-05-17 21:47:06 (GMT)
committerJunio C Hamano <gitster@pobox.com>2018-05-17 23:00:48 (GMT)
commit438a87d1e25fa6715f38e30ee394d34e71d44acb (patch)
treed6368e76af29a6e0bc5053b20d3c88c9b6b22171 /config.c
parentc71d8bb38a73abc910a63bf7a81f3869dc9c2f34 (diff)
downloadgit-438a87d1e25fa6715f38e30ee394d34e71d44acb.zip
git-438a87d1e25fa6715f38e30ee394d34e71d44acb.tar.gz
git-438a87d1e25fa6715f38e30ee394d34e71d44acb.tar.bz2
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>
Diffstat (limited to 'config.c')
-rw-r--r--config.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/config.c b/config.c
index d4527be..0205052 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 =