Re: [PATCH v2 3/6] rewrite git_config() to use the config-set API

2014-07-25 Thread Tanay Abhra
On 7/25/2014 7:28 PM, Matthieu Moy wrote: > Tanay Abhra writes: > >> +struct config_set_element { >> +struct hashmap_entry ent; >> +char *key; >> +struct string_list value_list; >> +}; >> + >> +struct configset_list_item { >> +struct config_set_element *e; >> +int value_inde

Re: [PATCH v2 3/6] rewrite git_config() to use the config-set API

2014-07-25 Thread Matthieu Moy
Tanay Abhra writes: > +struct config_set_element { > + struct hashmap_entry ent; > + char *key; > + struct string_list value_list; > +}; > + > +struct configset_list_item { > + struct config_set_element *e; > + int value_index; > +}; I originally wondered why you had two leve

[PATCH v2 3/6] rewrite git_config() to use the config-set API

2014-07-25 Thread Tanay Abhra
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