config: add CONFIG_ERROR_SILENT handler
[gitweb.git] / config.h
index 626d4654bd6f98771be903cca208fdb368920bf4..c02809ffdc6e34153de06db7a3f35782118627f1 100644 (file)
--- a/config.h
+++ b/config.h
@@ -54,6 +54,12 @@ struct config_options {
        const char *git_dir;
        config_parser_event_fn_t event_fn;
        void *event_fn_data;
+       enum config_error_action {
+               CONFIG_ERROR_UNSET = 0, /* use source-specific default */
+               CONFIG_ERROR_DIE, /* die() on error */
+               CONFIG_ERROR_ERROR, /* error() on error, return -1 */
+               CONFIG_ERROR_SILENT, /* return -1 */
+       } error_action;
 };
 
 typedef int (*config_fn_t)(const char *, const char *, void *);