diff options
author | Michele Ballabio <barra_cuda@katamail.com> | 2008-03-24 15:02:21 +0100 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2008-03-27 13:55:15 -0700 |
commit | 1f4a711a05e00db81da552dd990f6ddff4ffb63e (patch) | |
tree | afa79d66e796ca0ea45409979b6ee915a83e2c97 /parse-options.c | |
parent | 1768905b51601d5d080168059acd24d13b888a2d (diff) | |
download | git-1f4a711a05e00db81da552dd990f6ddff4ffb63e.tar.gz |
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>
Diffstat (limited to 'parse-options.c')
-rw-r--r-- | parse-options.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/parse-options.c b/parse-options.c index 8e64316fe0..e87cafbe41 100644 --- a/parse-options.c +++ b/parse-options.c @@ -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; +} |