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

2014-07-07 Thread Junio C Hamano
Tanay Abhra writes: > On 7/4/2014 2:47 PM, Matthieu Moy wrote: >> Tanay Abhra writes: >> >>> Hi, >>> >>> I have cooked up a single hashmap implementation. What are your >>> thoughts about it? >> >> I had a quick look, and it looks good to me. I'll make a more detailed >> review when you send t

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

2014-07-04 Thread Matthieu Moy
Tanay Abhra writes: > One more doubt, does for every value has any use other than > raising semantic error in typespecific API functions. I don't see any other. My suggestion would be: ignore this for now, it's not needed to get a new API that has at least as many features as the existing one.

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

2014-07-04 Thread Tanay Abhra
On 7/4/2014 2:47 PM, Matthieu Moy wrote: > Tanay Abhra writes: > >> Hi, >> >> I have cooked up a single hashmap implementation. What are your >> thoughts about it? > > I had a quick look, and it looks good to me. I'll make a more detailed > review when you send the next series. > One more dou

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

2014-07-04 Thread Matthieu Moy
Tanay Abhra writes: > Hi, > > I have cooked up a single hashmap implementation. What are your > thoughts about it? I had a quick look, and it looks good to me. I'll make a more detailed review when you send the next series. -- Matthieu Moy http://www-verimag.imag.fr/~moy/ -- To unsubscribe fro

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

2014-07-03 Thread Tanay Abhra
Hi, I have cooked up a single hashmap implementation. What are your thoughts about it? I must say it is much cleaner than the previous attempt and it passes all the tests. I will send the revised patch tomorrow with the corrected documentation, till then please say so if you prefer this one or the

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

2014-07-03 Thread Tanay Abhra
On 7/2/2014 10:30 PM, Junio C Hamano wrote: > Tanay Abhra writes: > >> diff --git a/Documentation/technical/api-config.txt >> b/Documentation/technical/api-config.txt >> index 230b3a0..2c02fee 100644 >> --- a/Documentation/technical/api-config.txt >> +++ b/Documentation/technical/api-config.tx

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

2014-07-02 Thread Matthieu Moy
Junio C Hamano writes: > Tanay Abhra writes: > >> diff --git a/Documentation/technical/api-config.txt >> b/Documentation/technical/api-config.txt >> index 230b3a0..2c02fee 100644 >> --- a/Documentation/technical/api-config.txt >> +++ b/Documentation/technical/api-config.txt >> @@ -77,6 +77,75 @

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

2014-07-02 Thread Junio C Hamano
Matthieu Moy writes: > I don't like the name "the_config_set". It's not the only one. Perhaps > repo_config_set? (not totally satisfactory as it does not contain only > the repo, but the repo+user+system) > > What do others think? I actually do like "the_configset", which goes nicely parallel to

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

2014-07-02 Thread Junio C Hamano
Tanay Abhra writes: > diff --git a/Documentation/technical/api-config.txt > b/Documentation/technical/api-config.txt > index 230b3a0..2c02fee 100644 > --- a/Documentation/technical/api-config.txt > +++ b/Documentation/technical/api-config.txt > @@ -77,6 +77,75 @@ To read a specific file in git-c

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

2014-07-02 Thread Matthieu Moy
Tanay Abhra writes: > On 7/2/2014 2:44 PM, Matthieu Moy wrote: >> Tanay Abhra writes: > Maybe a reworded sentence may work, > `git_configset_get_value_multi` returns a list of values sorted in order of > increasing priority (i.e. last match will be at the end of the list.) OK. >>> read from us

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

2014-07-02 Thread Tanay Abhra
On 7/2/2014 2:44 PM, Matthieu Moy wrote: > Tanay Abhra writes: > >> Add a `config_set` construct that points to an ordered set of config files >> specified by the user, each of which represents what was read and cached >> in core as hashmaps. Add two external functions `git_configset_get_value`

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

2014-07-02 Thread Matthieu Moy
Tanay Abhra writes: > Add a `config_set` construct that points to an ordered set of config files > specified by the user, each of which represents what was read and cached > in core as hashmaps. Add two external functions `git_configset_get_value` > and `git_configset_get_value_multi` for queryin

[PATCH v4 1/2] add `config_set` API for caching config files

2014-07-01 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