summaryrefslogtreecommitdiff
path: root/Documentation/technical
diff options
context:
space:
mode:
authorLibravatar Junio C Hamano <gitster@pobox.com>2016-05-23 14:54:31 -0700
committerLibravatar Junio C Hamano <gitster@pobox.com>2016-05-23 14:54:32 -0700
commit5d5f1c236b63596a59293a893d914dab1c8dd377 (patch)
treecdf9609dafcf846a91e3bf1cfb9c51d956bc7a5c /Documentation/technical
parentMerge branch 'xy/format-patch-base' (diff)
parentcommit: add a commit.verbose config variable (diff)
downloadtgif-5d5f1c236b63596a59293a893d914dab1c8dd377.tar.xz
Merge branch 'pb/commit-verbose-config'
"git commit" learned to pay attention to "commit.verbose" configuration variable and act as if "--verbose" option was given from the command line. * pb/commit-verbose-config: commit: add a commit.verbose config variable t7507-commit-verbose: improve test coverage by testing number of diffs parse-options.c: make OPTION_COUNTUP respect "unspecified" values t/t7507: improve test coverage t0040-parse-options: improve test coverage test-parse-options: print quiet as integer t0040-test-parse-options.sh: fix style issues
Diffstat (limited to 'Documentation/technical')
-rw-r--r--Documentation/technical/api-parse-options.txt8
1 files changed, 6 insertions, 2 deletions
diff --git a/Documentation/technical/api-parse-options.txt b/Documentation/technical/api-parse-options.txt
index 695bd4bf43..27bd701c0d 100644
--- a/Documentation/technical/api-parse-options.txt
+++ b/Documentation/technical/api-parse-options.txt
@@ -144,8 +144,12 @@ There are some macros to easily define options:
`OPT_COUNTUP(short, long, &int_var, description)`::
Introduce a count-up option.
- `int_var` is incremented on each use of `--option`, and
- reset to zero with `--no-option`.
+ Each use of `--option` increments `int_var`, starting from zero
+ (even if initially negative), and `--no-option` resets it to
+ zero. To determine if `--option` or `--no-option` was encountered at
+ all, initialize `int_var` to a negative value, and if it is still
+ negative after parse_options(), then neither `--option` nor
+ `--no-option` was seen.
`OPT_BIT(short, long, &int_var, description, mask)`::
Introduce a boolean option.