Re: [PATCH v2 5/6] config: add `git_die_config()` to the config-set API

2014-07-25 Thread Junio C Hamano
Tanay Abhra writes: > On 7/25/2014 7:33 PM, Matthieu Moy wrote: >> Tanay Abhra writes: >> >>> --- a/config.c >>> +++ b/config.c >>> @@ -1403,11 +1403,12 @@ const struct string_list >>> *git_configset_get_value_multi(struct config_set *cs, c >>> >>> int git_configset_get_string_const(struct

Re: [PATCH v2 5/6] config: add `git_die_config()` to the config-set API

2014-07-25 Thread Tanay Abhra
On 7/25/2014 7:33 PM, Matthieu Moy wrote: > Tanay Abhra writes: > >> --- a/config.c >> +++ b/config.c >> @@ -1403,11 +1403,12 @@ const struct string_list >> *git_configset_get_value_multi(struct config_set *cs, c >> >> int git_configset_get_string_const(struct config_set *cs, const char *ke

Re: [PATCH v2 5/6] config: add `git_die_config()` to the config-set API

2014-07-25 Thread Matthieu Moy
Tanay Abhra writes: > --- a/config.c > +++ b/config.c > @@ -1403,11 +1403,12 @@ const struct string_list > *git_configset_get_value_multi(struct config_set *cs, c > > int git_configset_get_string_const(struct config_set *cs, const char *key, > const char **dest) > { > - const char *valu

[PATCH v2 5/6] config: add `git_die_config()` to the config-set API

2014-07-25 Thread Tanay Abhra
Add `git_die_config` that dies printing the line number and the file name of the highest priority value for the configuration variable `key`. It has usage in non-callback based config value retrieval where we can raise an error and die if there is a semantic error. For example, if (!git_c