Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.kernel.org/pub/scm/git/git.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2009-04-19 01:46:22 +0400
committerJunio C Hamano <gitster@pobox.com>2009-04-19 01:46:22 +0400
commit4f760b74cfaa23222901739cdc62951cc7b8c5b6 (patch)
tree1452411184a945174ddddf05156d37c880bf1529
parent9824a388e53ba0951e38f246038fa0ef6fda3397 (diff)
parent0cbcf7ad71559245b59b90a324011fcf0657af8c (diff)
Merge branch 'lt/bool-on-off'
* lt/bool-on-off: Documentation: boolean value may be given by on/off Allow users to un-configure rename detection
-rw-r--r--Documentation/config.txt2
-rw-r--r--config.c4
2 files changed, 3 insertions, 3 deletions
diff --git a/Documentation/config.txt b/Documentation/config.txt
index 5319df5058..5ffd14141a 100644
--- a/Documentation/config.txt
+++ b/Documentation/config.txt
@@ -61,7 +61,7 @@ Internal whitespace within a variable value is retained verbatim.
The values following the equals sign in variable assign are all either
a string, an integer, or a boolean. Boolean values may be given as yes/no,
-0/1 or true/false. Case is not significant in boolean values, when
+0/1, true/false or on/off. Case is not significant in boolean values, when
converting value to the canonical form using '--bool' type specifier;
'git-config' will ensure that the output is "true" or "false".
diff --git a/config.c b/config.c
index 2d70398b16..8c1ae598a9 100644
--- a/config.c
+++ b/config.c
@@ -331,9 +331,9 @@ int git_config_bool_or_int(const char *name, const char *value, int *is_bool)
return 1;
if (!*value)
return 0;
- if (!strcasecmp(value, "true") || !strcasecmp(value, "yes"))
+ if (!strcasecmp(value, "true") || !strcasecmp(value, "yes") || !strcasecmp(value, "on"))
return 1;
- if (!strcasecmp(value, "false") || !strcasecmp(value, "no"))
+ if (!strcasecmp(value, "false") || !strcasecmp(value, "no") || !strcasecmp(value, "off"))
return 0;
*is_bool = 0;
return git_config_int(name, value);