From 7310ee0c37a67ad8ba7740fff4bc61d0f93f5a23 Mon Sep 17 00:00:00 2001 From: Glen Choo Date: Fri, 21 Jul 2023 13:42:22 -0700 Subject: [PATCH] WIP what breaks if we always die() on config errors? --- config.c | 28 ++++++++++++++-------------- 1 file changed, 14 insertions(+), 14 deletions(-) diff --git a/config.c b/config.c index ca77ca17a47663..f533f2886c0be3 100644 --- a/config.c +++ b/config.c @@ -1148,21 +1148,21 @@ static int git_parse_source(struct config_source *cs, config_fn_t fn, cs->linenr, cs->name); } - switch (opts && opts->error_action ? - opts->error_action : - cs->default_error_action) { - case CONFIG_ERROR_DIE: + /* switch (opts && opts->error_action ? */ + /* opts->error_action : */ + /* cs->default_error_action) { */ + /* case CONFIG_ERROR_DIE: */ die("%s", error_msg); - break; - case CONFIG_ERROR_ERROR: - error_return = error("%s", error_msg); - break; - case CONFIG_ERROR_SILENT: - error_return = -1; - break; - case CONFIG_ERROR_UNSET: - BUG("config error action unset"); - } + /* break; */ + /* case CONFIG_ERROR_ERROR: */ + /* error_return = error("%s", error_msg); */ + /* break; */ + /* case CONFIG_ERROR_SILENT: */ + /* error_return = -1; */ + /* break; */ + /* case CONFIG_ERROR_UNSET: */ + /* BUG("config error action unset"); */ + /* } */ free(error_msg); return error_return;