Re: [PATCH v5 1/2] add `config_set` API for caching config-like files

2014-07-06 Thread Matthieu Moy
Tanay Abhra writes: > Add a default `config_set`, `the_config_set` to cache all key-value pairs > read from usual config files (repo specific .git/config, user wide > ~/.gitconfig and the global /etc/gitconfig). `the_config_set` uses a > single hashmap populated using `git_config()`. "uses a sin

Re: [PATCH v5 1/2] add `config_set` API for caching config-like files

2014-07-06 Thread Ramsay Jones
On 06/07/14 08:19, Tanay Abhra wrote: > Currently `git_config()` uses a callback mechanism and file rereads for > config values. Due to this approach, it is not uncommon for the config > files to be parsed several times during the run of a git program, with > different callbacks picking out differe

[PATCH v5 1/2] add `config_set` API for caching config-like files

2014-07-06 Thread Tanay Abhra
Currently `git_config()` uses a callback mechanism and file rereads for config values. Due to this approach, it is not uncommon for the config files to be parsed several times during the run of a git program, with different callbacks picking out different variables useful to themselves. Add a `con