diff options
| author | Junio C Hamano <gitster@pobox.com> | 2025-02-21 10:35:53 -0800 |
|---|---|---|
| committer | Junio C Hamano <gitster@pobox.com> | 2025-02-21 10:35:53 -0800 |
| commit | 0fbe93b36c05bbf4156c157f27998938ce312265 (patch) | |
| tree | 39f285e9ebbf1aafa2025d072de7ee0833d3dea2 | |
| parent | 55b5ba87f1ce7ef5c9f891392a7271bfc4d62d2b (diff) | |
| parent | 832f56f06a5910b2f41a2e0dd8b382b6c709de07 (diff) | |
| download | git-0fbe93b36c05bbf4156c157f27998938ce312265.tar.gz | |
Merge branch 'jc/doc-boolean-synonyms'
Doc updates.
* jc/doc-boolean-synonyms:
doc: centrally document various ways tospell `true` and `false`
| -rw-r--r-- | Documentation/git-config.adoc | 4 | ||||
| -rw-r--r-- | Documentation/git.adoc | 5 | ||||
| -rw-r--r-- | Documentation/pretty-formats.adoc | 8 |
3 files changed, 10 insertions, 7 deletions
diff --git a/Documentation/git-config.adoc b/Documentation/git-config.adoc index 888f8ba54b..936e0c5130 100644 --- a/Documentation/git-config.adoc +++ b/Documentation/git-config.adoc @@ -213,7 +213,9 @@ See also <<FILES>>. + Valid `<type>`'s include: + -- 'bool': canonicalize values as either "true" or "false". +- 'bool': canonicalize values `true`, `yes`,`on`, and positive + numbers as "true", and values `false`, `no`, `off` and `0` as + "false". - 'int': canonicalize values as simple decimal numbers. An optional suffix of 'k', 'm', or 'g' will cause the value to be multiplied by 1024, 1048576, or 1073741824 upon input. diff --git a/Documentation/git.adoc b/Documentation/git.adoc index a9c1183318..743b7b00e4 100644 --- a/Documentation/git.adoc +++ b/Documentation/git.adoc @@ -472,8 +472,9 @@ Environment Variables --------------------- Various Git commands pay attention to environment variables and change their behavior. The environment variables marked as "Boolean" take -their values the same way as Boolean valued configuration variables, e.g. -"true", "yes", "on" and positive numbers are taken as "yes". +their values the same way as Boolean valued configuration variables, i.e., +"true", "yes", "on" and positive numbers are taken as "yes", while "false", +"no", "off", and "0" are taken as "no". Here are the variables: diff --git a/Documentation/pretty-formats.adoc b/Documentation/pretty-formats.adoc index 8ee940b6a4..07475de8c3 100644 --- a/Documentation/pretty-formats.adoc +++ b/Documentation/pretty-formats.adoc @@ -339,10 +339,10 @@ insert an empty string unless we are traversing reflog entries (e.g., by decoration format if `--decorate` was not already provided on the command line. -The boolean options accept an optional value `[=<bool-value>]`. The values -`true`, `false`, `on`, `off` etc. are all accepted. See the "boolean" -sub-section in "EXAMPLES" in linkgit:git-config[1]. If a boolean -option is given with no value, it's enabled. +The boolean options accept an optional value `[=<bool-value>]`. The +values taken by `--type=bool` git-config[1], like `yes` and `off`, +are all accepted. Giving a boolean option without `=<value>` is +equivalent to giving it with `=true`. If you add a `+` (plus sign) after '%' of a placeholder, a line-feed is inserted immediately before the expansion if and only if the |
