From a789ca70e7a5b02973b116d21674acd795238f99 Mon Sep 17 00:00:00 2001 From: Junio C Hamano Date: Mon, 4 Aug 2014 15:40:19 -0700 Subject: 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 Signed-off-by: Junio C Hamano --- Documentation/git.txt | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'Documentation') diff --git a/Documentation/git.txt b/Documentation/git.txt index 64da795aba..1557cd919d 100644 --- a/Documentation/git.txt +++ b/Documentation/git.txt @@ -429,6 +429,11 @@ example the following invocations are equivalent: given will override values from configuration files. The is expected in the same format as listed by 'git config' (subkeys separated by dots). ++ +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. --exec-path[=]:: Path to wherever your core Git programs are installed. -- cgit v1.2.1