parse-options.c: introduce OPT_DATE
There are quite a few places that will need to call approxidate(), when they'll adopt the parse-options system, so this patch adds the function parse_opt_approxidate_cb(), used by OPT_DATE. Signed-off-by: Michele Ballabio <barra_cuda@katamail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
This commit is contained in:

committed by
Junio C Hamano

parent
1768905b51
commit
1f4a711a05
@ -409,3 +409,10 @@ int parse_opt_abbrev_cb(const struct option *opt, const char *arg, int unset)
|
||||
*(int *)(opt->value) = v;
|
||||
return 0;
|
||||
}
|
||||
|
||||
int parse_opt_approxidate_cb(const struct option *opt, const char *arg,
|
||||
int unset)
|
||||
{
|
||||
*(unsigned long *)(opt->value) = approxidate(arg);
|
||||
return 0;
|
||||
}
|
||||
|
Reference in New Issue
Block a user