path: root/Documentation/technical/api-parse-options.txt
diff options
authorJunio C Hamano <>2013-04-25 18:13:49 (GMT)
committerJunio C Hamano <>2013-04-25 18:42:10 (GMT)
commit27ec394a9701675762f02e9af464be2c297c6cf1 (patch)
tree80e8547957da5c45f30847b553b3af54621281b0 /Documentation/technical/api-parse-options.txt
parent8a09e6c5f9010ac7159ef39a03b9a36bf233eaca (diff)
prune: introduce OPT_EXPIRY_DATE() and use it
Earlier we added support for --expire=all (or --expire=now) that considers all crufts, regardless of their age, as eligible for garbage collection by turning command argument parsers that use approxidate() to use parse_expiry_date(), but "git prune" used a built-in parse-options facility OPT_DATE() and did not benefit from the new function. Signed-off-by: Junio C Hamano <>
Diffstat (limited to 'Documentation/technical/api-parse-options.txt')
1 files changed, 4 insertions, 0 deletions
diff --git a/Documentation/technical/api-parse-options.txt b/Documentation/technical/api-parse-options.txt
index facc8c8..a8bae69 100644
--- a/Documentation/technical/api-parse-options.txt
+++ b/Documentation/technical/api-parse-options.txt
@@ -176,6 +176,10 @@ There are some macros to easily define options:
Introduce an option with date argument, see `approxidate()`.
The timestamp is put into `int_var`.
+`OPT_EXPIRY_DATE(short, long, &int_var, description)`::
+ Introduce an option with expiry date argument, see `parse_expiry_date()`.
+ The timestamp is put into `int_var`.
`OPT_CALLBACK(short, long, &var, arg_str, description, func_ptr)`::
Introduce an option with argument.
The argument will be fed into the function given by `func_ptr`