Merge branch 'gc/config-context'
Reduce reliance on a global state in the config reading API. * gc/config-context: config: pass source to config_parser_event_fn_t config: add kvi.path, use it to evaluate includes config.c: remove config_reader from configsets config: pass kvi to die_bad_number() trace2: plumb config kvi config.c: pass ctx with CLI config config: pass ctx with config files config.c: pass ctx in configsets config: add ctx arg to config_fn_t urlmatch.h: use config_fn_t type config: inline git_color_default_config
This commit is contained in:
@ -224,7 +224,9 @@ static int bundle_list_update(const char *key, const char *value,
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int config_to_bundle_list(const char *key, const char *value, void *data)
|
||||
static int config_to_bundle_list(const char *key, const char *value,
|
||||
const struct config_context *ctx UNUSED,
|
||||
void *data)
|
||||
{
|
||||
struct bundle_list *list = data;
|
||||
return bundle_list_update(key, value, list);
|
||||
@ -253,6 +255,7 @@ int bundle_uri_parse_config_format(const char *uri,
|
||||
}
|
||||
result = git_config_from_file_with_options(config_to_bundle_list,
|
||||
filename, list,
|
||||
CONFIG_SCOPE_UNKNOWN,
|
||||
&opts);
|
||||
|
||||
if (!result && list->mode == BUNDLE_MODE_NONE) {
|
||||
@ -871,7 +874,9 @@ cached:
|
||||
return advertise_bundle_uri;
|
||||
}
|
||||
|
||||
static int config_to_packet_line(const char *key, const char *value, void *data)
|
||||
static int config_to_packet_line(const char *key, const char *value,
|
||||
const struct config_context *ctx UNUSED,
|
||||
void *data)
|
||||
{
|
||||
struct packet_reader *writer = data;
|
||||
|
||||
|
Reference in New Issue
Block a user