From: Andreas Heiduk <asheiduk@gmail.com>
To: Git Mailing List <git@vger.kernel.org>
Cc: Andreas Heiduk <asheiduk@gmail.com>
Subject: [PATCH] doc: clarify "config --bool" behaviour with empty values
Date: Sun, 13 Aug 2017 11:48:16 +0200 [thread overview]
Message-ID: <20170813094816.7754-1-asheiduk@gmail.com> (raw)
`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
next reply other threads:[~2017-08-13 9:48 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-08-13 9:48 Andreas Heiduk [this message]
2017-08-14 17:53 ` [PATCH] doc: clarify "config --bool" behaviour with empty values 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
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20170813094816.7754-1-asheiduk@gmail.com \
--to=asheiduk@gmail.com \
--cc=git@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).