git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] doc: clarify "config --bool" behaviour with empty values
@ 2017-08-13  9:48 Andreas Heiduk
  2017-08-14 17:53 ` Junio C Hamano
  0 siblings, 1 reply; 6+ messages in thread
From: Andreas Heiduk @ 2017-08-13  9:48 UTC (permalink / raw)
  To: Git Mailing List; +Cc: Andreas Heiduk

`git config --bool xxx.yyy` returns `true` for `[xxx]yyy` but
`false` for `[xxx]yyy=` or `[xxx]yyy=""`.  This is tested in
t1300-repo-config.sh since 09bc098c2.

Signed-off-by: Andreas Heiduk <asheiduk@gmail.com>
---
 Documentation/config.txt | 3 ++-
 Documentation/git.txt    | 3 ++-
 2 files changed, 4 insertions(+), 2 deletions(-)

diff --git a/Documentation/config.txt b/Documentation/config.txt
index d5c9c4cab..d3261006b 100644
--- a/Documentation/config.txt
+++ b/Documentation/config.txt
@@ -221,7 +221,8 @@ boolean::
 		is taken as true.
 
        false;; Boolean false can be spelled as `no`, `off`,
-		`false`, or `0`.
+		`false`, `0`, no value (but still with `=`) or the
+		empty string.
 +
 When converting value to the canonical form using `--bool` type
 specifier; 'git config' will ensure that the output is "true" or
diff --git a/Documentation/git.txt b/Documentation/git.txt
index 7dd5e0328..6e3a6767e 100644
--- a/Documentation/git.txt
+++ b/Documentation/git.txt
@@ -75,7 +75,8 @@ example the following invocations are equivalent:
 Note that omitting the `=` in `git -c foo.bar ...` is allowed and sets
 `foo.bar` to the boolean true value (just like `[foo]bar` would in a
 config file). Including the equals but with an empty value (like `git -c
-foo.bar= ...`) sets `foo.bar` to the empty string.
+foo.bar= ...`) sets `foo.bar` to the empty string which ` git config
+--bool` will convert to `false`.
 
 --exec-path[=<path>]::
 	Path to wherever your core Git programs are installed.
-- 
2.13.3


^ permalink raw reply related	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2017-08-14 22:24 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-08-13  9:48 [PATCH] doc: clarify "config --bool" behaviour with empty values Andreas Heiduk
2017-08-14 17:53 ` Junio C Hamano
2017-08-14 22:07   ` Andreas Heiduk
2017-08-14 22:12     ` [PATCH v2] " Andreas Heiduk
2017-08-14 22:24       ` Junio C Hamano
2017-08-14 22:21     ` [PATCH] " Junio C Hamano

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).