Merge branch 'jc/prune-all'
We used the approxidate() parser for "--expire=<timestamp>" options of various commands, but it is better to treat --expire=all and --expire=now a bit more specially than using the current timestamp. Update "git gc" and "git reflog" with a new parsing function for expiry dates. * jc/prune-all: prune: introduce OPT_EXPIRY_DATE() and use it api-parse-options.txt: document "no-" for non-boolean options git-gc.txt, git-reflog.txt: document new expiry options date.c: add parse_expiry_date()
This commit is contained in:
@ -140,6 +140,9 @@ struct option {
|
||||
#define OPT_DATE(s, l, v, h) \
|
||||
{ OPTION_CALLBACK, (s), (l), (v), N_("time"),(h), 0, \
|
||||
parse_opt_approxidate_cb }
|
||||
#define OPT_EXPIRY_DATE(s, l, v, h) \
|
||||
{ OPTION_CALLBACK, (s), (l), (v), N_("expiry date"),(h), 0, \
|
||||
parse_opt_expiry_date_cb }
|
||||
#define OPT_CALLBACK(s, l, v, a, h, f) \
|
||||
{ OPTION_CALLBACK, (s), (l), (v), (a), (h), 0, (f) }
|
||||
#define OPT_NUMBER_CALLBACK(v, h, f) \
|
||||
@ -219,6 +222,7 @@ extern int parse_options_concat(struct option *dst, size_t, struct option *src);
|
||||
/*----- some often used options -----*/
|
||||
extern int parse_opt_abbrev_cb(const struct option *, const char *, int);
|
||||
extern int parse_opt_approxidate_cb(const struct option *, const char *, int);
|
||||
extern int parse_opt_expiry_date_cb(const struct option *, const char *, int);
|
||||
extern int parse_opt_color_flag_cb(const struct option *, const char *, int);
|
||||
extern int parse_opt_verbosity_cb(const struct option *, const char *, int);
|
||||
extern int parse_opt_with_commit(const struct option *, const char *, int);
|
||||
|
||||
Reference in New Issue
Block a user