]> git.ipfire.org Git - thirdparty/git.git/blobdiff - Documentation/technical/api-parse-options.txt
prune: introduce OPT_EXPIRY_DATE() and use it
[thirdparty/git.git] / Documentation / technical / api-parse-options.txt
index 3062389404e2d4b5f45fa7f5a324e65f933e08b0..a8bae69e6e40b96fca90f2c4d4e651c2ddcd260f 100644 (file)
@@ -41,6 +41,8 @@ The parse-options API allows:
 * Boolean long options can be 'negated' (or 'unset') by prepending
   `no-`, e.g. `--no-abbrev` instead of `--abbrev`. Conversely,
   options that begin with `no-` can be 'negated' by removing it.
+  Other long options can be unset (e.g., set string to NULL, set
+  integer to 0) by prepending `no-`.
 
 * Options and non-option arguments can clearly be separated using the `--`
   option, e.g. `-a -b --option -- --this-is-a-file` indicates that
@@ -174,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`