config: teach "git -c" to recognize an empty string
commita789ca70e7a5b02973b116d21674acd795238f99
authorJunio C Hamano <gitster@pobox.com>
Mon, 4 Aug 2014 22:40:19 +0000 (4 15:40 -0700)
committerJunio C Hamano <gitster@pobox.com>
Tue, 5 Aug 2014 17:09:17 +0000 (5 10:09 -0700)
treefd5e0827a1737e07858c5418e9d5c4fa6b570dfc
parente6aaa393478bf3ee9f4cde8d82cd258c034cd335
config: teach "git -c" to recognize an empty string

In a config file, you can do:

  [foo]
  bar

to turn the "foo.bar" boolean flag on, and you can do:

  [foo]
  bar=

to set "foo.bar" to the empty string. However, git's "-c"
parameter treats both:

  git -c foo.bar

and

  git -c foo.bar=

as the boolean flag, and there is no way to set a variable
to the empty string. This patch enables the latter form to
do that.

Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Documentation/git.txt
config.c
t/t1300-repo-config.sh