Re: [PATCH v8 0/8] Rewrite `git_config()` using config-set API

2014-08-11 Thread Ramsay Jones
On 10/08/14 18:29, Junio C Hamano wrote: Ramsay Jones ram...@ramsay1.demon.co.uk writes: On 08/08/14 15:07, Tanay Abhra wrote: ... (cc to Ramsay) The discussion in both threads (v8 and v9), boils down to this, is the `key_value_info` struct really required to be declared public or

Re: [PATCH v8 0/8] Rewrite `git_config()` using config-set API

2014-08-10 Thread Junio C Hamano
Ramsay Jones ram...@ramsay1.demon.co.uk writes: On 08/08/14 15:07, Tanay Abhra wrote: ... (cc to Ramsay) The discussion in both threads (v8 and v9), boils down to this, is the `key_value_info` struct really required to be declared public or should be just an implementation detail. I

Re: [PATCH v8 0/8] Rewrite `git_config()` using config-set API

2014-08-08 Thread Tanay Abhra
On 8/8/2014 2:01 AM, Junio C Hamano wrote: Matthieu Moy matthieu@grenoble-inp.fr writes: Why is this needed? Are you now using key_value_info outside config.c? Or is it a leftover from a previous experiment? Has this been resolved in the new round? Tanay explained in another subthread

Re: [PATCH v8 0/8] Rewrite `git_config()` using config-set API

2014-08-08 Thread Ramsay Jones
On 08/08/14 15:07, Tanay Abhra wrote: On 8/8/2014 2:01 AM, Junio C Hamano wrote: Matthieu Moy matthieu@grenoble-inp.fr writes: Why is this needed? Are you now using key_value_info outside config.c? Or is it a leftover from a previous experiment? Has this been resolved in the new round?

Re: [PATCH v8 0/8] Rewrite `git_config()` using config-set API

2014-08-07 Thread Junio C Hamano
Matthieu Moy matthieu@grenoble-inp.fr writes: Tanay Abhra tanay...@gmail.com writes: --- a/cache.h +++ b/cache.h @@ -1406,8 +1406,14 @@ extern int git_config_get_bool(const char *key, int *dest); [...] +struct key_value_info { +const char *filename; +int linenr; +}; [...]

Re: [PATCH v8 0/8] Rewrite `git_config()` using config-set API

2014-08-07 Thread Matthieu Moy
Junio C Hamano gits...@pobox.com writes: Matthieu Moy matthieu@grenoble-inp.fr writes: Tanay Abhra tanay...@gmail.com writes: --- a/cache.h +++ b/cache.h @@ -1406,8 +1406,14 @@ extern int git_config_get_bool(const char *key, int *dest); [...] +struct key_value_info { + const

Re: [PATCH v8 0/8] Rewrite `git_config()` using config-set API

2014-08-07 Thread Junio C Hamano
Matthieu Moy matthieu@grenoble-inp.fr writes: Why is this needed? Are you now using key_value_info outside config.c? Or is it a leftover from a previous experiment? Has this been resolved in the new round? Tanay explained in another subthread why this was needed. For callers iterating

[PATCH v8 0/8] Rewrite `git_config()` using config-set API

2014-08-06 Thread Tanay Abhra
[Patch v8]: git_die_config now allows custom error messages. new tests are now not too reliant on specific strings. Diff between v7 v8 is appended at the bottom. Thanks to Junio Matthieu for their suggestions. [Patch v7]: style nit corrected. (1/8) is Matthieu's

Re: [PATCH v8 0/8] Rewrite `git_config()` using config-set API

2014-08-06 Thread Matthieu Moy
Tanay Abhra tanay...@gmail.com writes: --- a/cache.h +++ b/cache.h @@ -1406,8 +1406,14 @@ extern int git_config_get_bool(const char *key, int *dest); [...] +struct key_value_info { + const char *filename; + int linenr; +}; [...] diff --git a/config.c b/config.c index