Merge branch 'js/gc-with-stale-symref' into maint
[gitweb.git] / Documentation / technical / api-parse-options.txt
index be50cf4de35c856da051f985eb42c22dbaac88e4..5f0757dcc965fc89b96f18e31732390b1afeb84e 100644 (file)
@@ -160,10 +160,6 @@ There are some macros to easily define options:
        `int_var` is set to `integer` with `--option`, and
        reset to zero with `--no-option`.
 
-`OPT_SET_PTR(short, long, &ptr_var, description, ptr)`::
-       Introduce a boolean option.
-       If used, set `ptr_var` to `ptr`.
-
 `OPT_STRING(short, long, &str_var, arg_str, description)`::
        Introduce an option with string argument.
        The string argument is put into `str_var`.
@@ -172,6 +168,12 @@ There are some macros to easily define options:
        Introduce an option with integer argument.
        The integer is put into `int_var`.
 
+`OPT_MAGNITUDE(short, long, &unsigned_long_var, description)`::
+       Introduce an option with a size argument. The argument must be a
+       non-negative integer and may include a suffix of 'k', 'm' or 'g' to
+       scale the provided value by 1024, 1024^2 or 1024^3 respectively.
+       The scaled value is put into `unsigned_long_var`.
+
 `OPT_DATE(short, long, &int_var, description)`::
        Introduce an option with date argument, see `approxidate()`.
        The timestamp is put into `int_var`.
@@ -216,6 +218,19 @@ There are some macros to easily define options:
        Use it to hide deprecated options that are still to be recognized
        and ignored silently.
 
+`OPT_PASSTHRU(short, long, &char_var, arg_str, description, flags)`::
+       Introduce an option that will be reconstructed into a char* string,
+       which must be initialized to NULL. This is useful when you need to
+       pass the command-line option to another command. Any previous value
+       will be overwritten, so this should only be used for options where
+       the last one specified on the command line wins.
+
+`OPT_PASSTHRU_ARGV(short, long, &argv_array_var, arg_str, description, flags)`::
+       Introduce an option where all instances of it on the command-line will
+       be reconstructed into an argv_array. This is useful when you need to
+       pass the command-line option, which can be specified multiple times,
+       to another command.
+
 
 The last element of the array must be `OPT_END()`.