Skip to content

Commit

Permalink
WIP what breaks if we always die() on config errors?
Browse files Browse the repository at this point in the history
  • Loading branch information
chooglen committed Jul 21, 2023
1 parent 9924481 commit 7310ee0
Showing 1 changed file with 14 additions and 14 deletions.
28 changes: 14 additions & 14 deletions config.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 7310ee0

Please sign in to comment.