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 detectionmaint
commit
4f760b74cf
|
@ -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".
|
||||
|
||||
|
|
4
config.c
4
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);
|
||||
|
|
Loading…
Reference in New Issue