Junio C Hamano writes:
>> +int git_config(config_fn_t fn, void *data)
>> +{
>> +git_config_check_init();
>> +return configset_iter(&the_config_set, fn, data);
>> +}
>
> Perhaps if you define this function at the right place in the file
> you do not have to add an forward decl of git_confi
Tanay Abhra writes:
> Of all the functions in `git_config*()` family, `git_config()` has the
> most invocations in the whole code base. Each `git_config()` invocation
> causes config file rereads which can be avoided using the config-set API.
>
> Use the config-set API to rewrite `git_config()` t
Tanay Abhra writes:
> +static int configset_iter(struct config_set *cs, config_fn_t fn, void *data)
> +{
> + int i;
> + struct string_list *strptr;
> + struct config_set_element *entry;
> + struct hashmap_iter iter;
> + hashmap_iter_init(&cs->config_hash, &iter);
> + while
Tanay Abhra writes:
> -int git_config(config_fn_t fn, void *data)
> +static int git_config_raw(config_fn_t fn, void *data)
As you noticed already, this change breaks several tests. You are going
to repair them later in the series, but your patch series produces a
non-bisectable history.
The his
Of all the functions in `git_config*()` family, `git_config()` has the
most invocations in the whole code base. Each `git_config()` invocation
causes config file rereads which can be avoided using the config-set API.
Use the config-set API to rewrite `git_config()` to use the config caching
layer
5 matches
Mail list logo