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

2014-07-07 Thread Junio C Hamano
Tanay Abhra tanay...@gmail.com writes: On 7/4/2014 2:47 PM, Matthieu Moy wrote: Tanay Abhra tanay...@gmail.com 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

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

2014-07-04 Thread Matthieu Moy
Tanay Abhra tanay...@gmail.com 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

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 tanay...@gmail.com 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

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

2014-07-04 Thread Matthieu Moy
Tanay Abhra tanay...@gmail.com writes: One more doubt, does filename,linenr 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

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 tanay...@gmail.com 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 +++

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

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

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

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

2014-07-02 Thread Matthieu Moy
Tanay Abhra tanay...@gmail.com 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

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 tanay...@gmail.com 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

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

2014-07-02 Thread Matthieu Moy
Tanay Abhra tanay...@gmail.com writes: On 7/2/2014 2:44 PM, Matthieu Moy wrote: Tanay Abhra tanay...@gmail.com 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

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

2014-07-02 Thread Junio C Hamano
Tanay Abhra tanay...@gmail.com 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

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

2014-07-02 Thread Junio C Hamano
Matthieu Moy matthieu@grenoble-inp.fr 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

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

2014-07-02 Thread Matthieu Moy
Junio C Hamano gits...@pobox.com writes: Tanay Abhra tanay...@gmail.com 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 +++