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

2014-08-05 Thread Tanay Abhra
On 8/5/2014 1:34 AM, Matthieu Moy wrote: Tanay Abhra tanay...@gmail.com writes: I was aping the old git_config() system, it also does exactly what you described above. for example, builtin/gc.c line 91, if (!strcmp(var, gc.pruneexpire)) { if (value

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

2014-08-05 Thread Matthieu Moy
Tanay Abhra tanay...@gmail.com writes: Matthieu, I have finished the new version, but instead of flooding the mailing list with a series again, I wanted to confirm if the new git_config_die() is alright. NORETURN __attribute__((format(printf, 2, 3))) void git_die_config(const

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

2014-08-05 Thread Junio C Hamano
Matthieu Moy matthieu@grenoble-inp.fr writes: Tanay Abhra tanay...@gmail.com writes: Currently works like the old git_config() error reporting path. If err is set to NULL, it would print no error message and just the die message. If given something like, git_config_die(key,

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

2014-08-04 Thread Junio C Hamano
Tanay Abhra tanay...@gmail.com writes: 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

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

2014-08-04 Thread Tanay Abhra
On 8/4/2014 11:37 PM, Junio C Hamano wrote: Tanay Abhra tanay...@gmail.com writes: 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

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

2014-08-04 Thread Matthieu Moy
Tanay Abhra tanay...@gmail.com writes: I was aping the old git_config() system, it also does exactly what you described above. for example, builtin/gc.c line 91, if (!strcmp(var, gc.pruneexpire)) { if (value strcmp(value, now)) { unsigned

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

2014-08-04 Thread Junio C Hamano
Tanay Abhra tanay...@gmail.com writes: On 8/4/2014 11:37 PM, Junio C Hamano wrote: Tanay Abhra tanay...@gmail.com writes: 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

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

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