Re: [PATCH v1 15/19] config: add git_config_get_date_string() from gc.c

2016-11-28 Thread Junio C Hamano
Christian Couder writes: > What about something like this then: > > /* This dies if the configured or default date is in the future */ > extern int git_config_get_expiry_or_die(const char *key, const char **output); > > Also git_config_get_int(), git_config_get_bool() and probably other > such fu

Re: [PATCH v1 15/19] config: add git_config_get_date_string() from gc.c

2016-11-28 Thread Christian Couder
On Wed, Nov 23, 2016 at 6:34 PM, Junio C Hamano wrote: > Christian Couder writes: > >> Ok it will appear like this in cache.h: >> >> /* This dies if the configured or default date is in the future */ >> extern int git_config_get_expire_date_string(const char *key, const >> char **output); > > Tho

Re: [PATCH v1 15/19] config: add git_config_get_date_string() from gc.c

2016-11-23 Thread Junio C Hamano
Christian Couder writes: > Ok it will appear like this in cache.h: > > /* This dies if the configured or default date is in the future */ > extern int git_config_get_expire_date_string(const char *key, const > char **output); Those who imitate existing callsites never read comments, and you need

Re: [PATCH v1 15/19] config: add git_config_get_date_string() from gc.c

2016-11-23 Thread Christian Couder
On Tue, Nov 1, 2016 at 8:28 PM, Junio C Hamano wrote: > Christian Couder writes: > >> This function will be used in a following commit to get the expiration >> time of the shared index files from the config, and it is generic >> enough to be put in "config.c". > > Is it generic enough that a help

Re: [PATCH v1 15/19] config: add git_config_get_date_string() from gc.c

2016-11-01 Thread Junio C Hamano
Christian Couder writes: > This function will be used in a following commit to get the expiration > time of the shared index files from the config, and it is generic > enough to be put in "config.c". Is it generic enough that a helper that sounds as if it can get any date string dies if it is gi

[PATCH v1 15/19] config: add git_config_get_date_string() from gc.c

2016-10-23 Thread Christian Couder
This function will be used in a following commit to get the expiration time of the shared index files from the config, and it is generic enough to be put in "config.c". Signed-off-by: Christian Couder --- builtin/gc.c | 15 ++- cache.h | 1 + config.c | 13 + 3