diff options
author | Junio C Hamano <gitster@pobox.com> | 2019-04-25 10:41:14 +0300 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2019-04-25 10:41:14 +0300 |
commit | b72e90712eb0e802b232ad4c88460d04279c7111 (patch) | |
tree | fa942ba292b5e3dd1091c526700a7d801ef40358 /Documentation | |
parent | d2dba18ced8e4939a3cd135998c54874ce73adc1 (diff) | |
parent | 20de316e33446f37200e51aa333ba7d824dfd478 (diff) |
Merge branch 'js/difftool-no-index'
"git difftool" can now run outside a repository.
* js/difftool-no-index:
difftool: allow running outside Git worktrees with --no-index
parse-options: make OPT_ARGUMENT() more useful
difftool: remove obsolete (and misleading) comment
Diffstat (limited to 'Documentation')
-rw-r--r-- | Documentation/technical/api-parse-options.txt | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/Documentation/technical/api-parse-options.txt b/Documentation/technical/api-parse-options.txt index 2b036d7838..2e2e7c10c6 100644 --- a/Documentation/technical/api-parse-options.txt +++ b/Documentation/technical/api-parse-options.txt @@ -198,8 +198,10 @@ There are some macros to easily define options: The filename will be prefixed by passing the filename along with the prefix argument of `parse_options()` to `prefix_filename()`. -`OPT_ARGUMENT(long, description)`:: +`OPT_ARGUMENT(long, &int_var, description)`:: Introduce a long-option argument that will be kept in `argv[]`. + If this option was seen, `int_var` will be set to one (except + if a `NULL` pointer was passed). `OPT_NUMBER_CALLBACK(&var, description, func_ptr)`:: Recognize numerical options like -123 and feed the integer as |