diff options
author | Junio C Hamano <gitster@pobox.com> | 2016-05-23 14:54:31 -0700 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2016-05-23 14:54:32 -0700 |
commit | 5d5f1c236b63596a59293a893d914dab1c8dd377 (patch) | |
tree | cdf9609dafcf846a91e3bf1cfb9c51d956bc7a5c /Documentation | |
parent | 72ce3ff7b51c1e0703f433fb000519521441abf8 (diff) | |
parent | aaab84203b9654fb73df41d3cb71a6aad3a091fa (diff) | |
download | git-5d5f1c236b63596a59293a893d914dab1c8dd377.tar.gz |
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')
-rw-r--r-- | Documentation/config.txt | 4 | ||||
-rw-r--r-- | Documentation/git-commit.txt | 3 | ||||
-rw-r--r-- | Documentation/technical/api-parse-options.txt | 8 |
3 files changed, 12 insertions, 3 deletions
diff --git a/Documentation/config.txt b/Documentation/config.txt index ea928a729f..53f00dbc26 100644 --- a/Documentation/config.txt +++ b/Documentation/config.txt @@ -1141,6 +1141,10 @@ commit.template:: Specify the pathname of a file to use as the template for new commit messages. +commit.verbose:: + A boolean or int to specify the level of verbose with `git commit`. + See linkgit:git-commit[1]. + credential.helper:: Specify an external helper to be called when a username or password credential is needed; the helper may consult external diff --git a/Documentation/git-commit.txt b/Documentation/git-commit.txt index 9ec6b3cc17..d474226eb7 100644 --- a/Documentation/git-commit.txt +++ b/Documentation/git-commit.txt @@ -290,7 +290,8 @@ configuration variable documented in linkgit:git-config[1]. what changes the commit has. Note that this diff output doesn't have its lines prefixed with '#'. This diff will not be a part - of the commit message. + of the commit message. See the `commit.verbose` configuration + variable in linkgit:git-config[1]. + If specified twice, show in addition the unified diff between what would be committed and the worktree files, i.e. the unstaged 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. |