Skip to content

Commit 0fbe93b

Browse files
committed
Merge branch 'jc/doc-boolean-synonyms'
Doc updates. * jc/doc-boolean-synonyms: doc: centrally document various ways tospell `true` and `false`
2 parents 55b5ba8 + 832f56f commit 0fbe93b

File tree

3 files changed

+10
-7
lines changed

3 files changed

+10
-7
lines changed

Documentation/git-config.adoc

+3-1
Original file line numberDiff line numberDiff line change
@@ -213,7 +213,9 @@ See also <<FILES>>.
213213
+
214214
Valid `<type>`'s include:
215215
+
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".
217219
- 'int': canonicalize values as simple decimal numbers. An optional suffix of
218220
'k', 'm', or 'g' will cause the value to be multiplied by 1024, 1048576, or
219221
1073741824 upon input.

Documentation/git.adoc

+3-2
Original file line numberDiff line numberDiff line change
@@ -472,8 +472,9 @@ Environment Variables
472472
---------------------
473473
Various Git commands pay attention to environment variables and change
474474
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".
477478

478479
Here are the variables:
479480

Documentation/pretty-formats.adoc

+4-4
Original file line numberDiff line numberDiff line change
@@ -339,10 +339,10 @@ insert an empty string unless we are traversing reflog entries (e.g., by
339339
decoration format if `--decorate` was not already provided on the command
340340
line.
341341
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`.
346346
347347
If you add a `+` (plus sign) after '%' of a placeholder, a line-feed
348348
is inserted immediately before the expansion if and only if the

0 commit comments

Comments
 (0)