path: root/Documentation/technical
diff options
authorJunio C Hamano <>2016-05-23 21:54:31 (GMT)
committerJunio C Hamano <>2016-05-23 21:54:32 (GMT)
commit5d5f1c236b63596a59293a893d914dab1c8dd377 (patch)
treecdf9609dafcf846a91e3bf1cfb9c51d956bc7a5c /Documentation/technical
parent72ce3ff7b51c1e0703f433fb000519521441abf8 (diff)
parentaaab84203b9654fb73df41d3cb71a6aad3a091fa (diff)
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 fix style issues
Diffstat (limited to 'Documentation/technical')
1 files changed, 6 insertions, 2 deletions
diff --git a/Documentation/technical/api-parse-options.txt b/Documentation/technical/api-parse-options.txt
index 695bd4b..27bd701 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.