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 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 >

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

2014-08-10 Thread Junio C Hamano
Ramsay Jones 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 will give you th

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 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-08 Thread Tanay Abhra
On 8/8/2014 2:01 AM, Junio C Hamano wrote: > Matthieu Moy 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

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

2014-08-07 Thread Junio C Hamano
Matthieu Moy 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 over the string_

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

2014-08-07 Thread Matthieu Moy
Junio C Hamano writes: > Matthieu Moy writes: > >> Tanay Abhra 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 Junio C Hamano
Matthieu Moy writes: > Tanay Abhra 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

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

2014-08-06 Thread Matthieu Moy
Tanay Abhra 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 cf9124f..427850a 10

[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 transla