Skip to content

Commit 562eb0b

Browse files
committed
Merge branch 'js/config-parse' into seen
The parsing routines for the configuration files have been split into a separate file. * js/config-parse: config-parse: split library out of config.[c|h] config.c: accept config_parse_options in git_config_from_stdin config: report config parse errors using cb config: split out config_parse_options
2 parents ee83706 + 930e7b4 commit 562eb0b

File tree

9 files changed

+795
-732
lines changed

9 files changed

+795
-732
lines changed

Makefile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -992,6 +992,7 @@ LIB_OBJS += compat/obstack.o
992992
LIB_OBJS += compat/terminal.o
993993
LIB_OBJS += compat/zlib-uncompress2.o
994994
LIB_OBJS += config.o
995+
LIB_OBJS += config-parse.o
995996
LIB_OBJS += connect.o
996997
LIB_OBJS += connected.o
997998
LIB_OBJS += convert.o

builtin/config.c

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,9 @@ static int actions, type;
4040
static char *default_value;
4141
static int end_nul;
4242
static int respect_includes_opt = -1;
43-
static struct config_options config_options;
43+
static struct config_options config_options = {
44+
.parse_options = CP_OPTS_INIT(CONFIG_ERROR_DIE)
45+
};
4446
static int show_origin;
4547
static int show_scope;
4648
static int fixed_value;

bundle-uri.c

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -237,9 +237,7 @@ int bundle_uri_parse_config_format(const char *uri,
237237
struct bundle_list *list)
238238
{
239239
int result;
240-
struct config_options opts = {
241-
.error_action = CONFIG_ERROR_ERROR,
242-
};
240+
struct config_parse_options opts = CP_OPTS_INIT(CONFIG_ERROR_ERROR);
243241

244242
if (!list->baseURI) {
245243
struct strbuf baseURI = STRBUF_INIT;

0 commit comments

Comments
 (0)