doc: centrally document various ways tospell `true` and `false`

We do not seem to centrally document exhaustively ways to spell Boolean values. The description in the Environment Variables of git(1) section assumes that the reader is already familiar with how "Boolean valued configuration variables" are specified, without referring to anything, so there is no way for the readers to find out more. The description of `bool` in the section on "--type <type>" in "git config --help" might be the place to do so, but it is not telling us all that much. The description of Boolean valued placeholders in the pretty formats section of "git log --help" enumerates the possible values with "etc." implying there may be other synonyms; shrink the list of samples and instead refer to the canonical and authoritative source of truth, which now is git-config(1). Signed-off-by: Junio C Hamano <gitster@pobox.com>

Junio C Hamano committed Feb 11, 2025 at 09:20 UTC 832f56f06a5910b2f41a2e0dd8b382b6c709de07
3 files changed +10 -7
Documentation/git-config.txt
+3 -1
@@ -213,7 +213,9 @@ See also <<FILES>>.
213 +
214 Valid `<type>`'s include:
215 +
216 -- 'bool': canonicalize values as either "true" or "false".
216 +- 'bool': canonicalize values `true`, `yes`,`on`, and positive
217 + numbers as "true", and values `false`, `no`, `off` and `0` as
218 + "false".
219 - 'int': canonicalize values as simple decimal numbers. An optional suffix of
220 'k', 'm', or 'g' will cause the value to be multiplied by 1024, 1048576, or
221 1073741824 upon input.
Documentation/git.txt
+3 -2
@@ -472,8 +472,9 @@ Environment Variables
472 ---------------------
473 Various Git commands pay attention to environment variables and change
474 their behavior. The environment variables marked as "Boolean" take
475 -their values the same way as Boolean valued configuration variables, e.g.
476 -"true", "yes", "on" and positive numbers are taken as "yes".
475 +their values the same way as Boolean valued configuration variables, i.e.,
476 +"true", "yes", "on" and positive numbers are taken as "yes", while "false",
477 +"no", "off", and "0" are taken as "no".
478
479 Here are the variables:
480
Documentation/pretty-formats.txt
+4 -4
@@ -339,10 +339,10 @@ insert an empty string unless we are traversing reflog entries (e.g., by
339 decoration format if `--decorate` was not already provided on the command
340 line.
341
342 -The boolean options accept an optional value `[=<bool-value>]`. The values
343 -`true`, `false`, `on`, `off` etc. are all accepted. See the "boolean"
344 -sub-section in "EXAMPLES" in linkgit:git-config[1]. If a boolean
345 -option is given with no value, it's enabled.
342 +The boolean options accept an optional value `[=<bool-value>]`. The
343 +values taken by `--type=bool` git-config[1], like `yes` and `off`,
344 +are all accepted. Giving a boolean option without `=<value>` is
345 +equivalent to giving it with `=true`.
346
347 If you add a `+` (plus sign) after '%' of a placeholder, a line-feed
348 is inserted immediately before the expansion if and only if the