Skip to content

Commit b438722

Browse files
committed
Merge branch 'ah/doc-empty-string-is-false' into maint
Doc update. * ah/doc-empty-string-is-false: doc: clarify "config --bool" behaviour with empty string
2 parents afa6608 + 7f0a02b commit b438722

File tree

2 files changed

+7
-6
lines changed

2 files changed

+7
-6
lines changed

Documentation/config.txt

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -216,15 +216,15 @@ boolean::
216216
synonyms are accepted for 'true' and 'false'; these are all
217217
case-insensitive.
218218

219-
true;; Boolean true can be spelled as `yes`, `on`, `true`,
220-
or `1`. Also, a variable defined without `= <value>`
219+
true;; Boolean true literals are `yes`, `on`, `true`,
220+
and `1`. Also, a variable defined without `= <value>`
221221
is taken as true.
222222

223-
false;; Boolean false can be spelled as `no`, `off`,
224-
`false`, or `0`.
223+
false;; Boolean false literals are `no`, `off`, `false`,
224+
`0` and the empty string.
225225
+
226226
When converting value to the canonical form using `--bool` type
227-
specifier; 'git config' will ensure that the output is "true" or
227+
specifier, 'git config' will ensure that the output is "true" or
228228
"false" (spelled in lowercase).
229229

230230
integer::

Documentation/git.txt

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,8 @@ example the following invocations are equivalent:
7575
Note that omitting the `=` in `git -c foo.bar ...` is allowed and sets
7676
`foo.bar` to the boolean true value (just like `[foo]bar` would in a
7777
config file). Including the equals but with an empty value (like `git -c
78-
foo.bar= ...`) sets `foo.bar` to the empty string.
78+
foo.bar= ...`) sets `foo.bar` to the empty string which ` git config
79+
--bool` will convert to `false`.
7980

8081
--exec-path[=<path>]::
8182
Path to wherever your core Git programs are installed.

0 commit comments

Comments
 (0)