boolean: accept yes and no as well

Signed-off-by: Junio C Hamano <junkio@cox.net>
This commit is contained in:
Junio C Hamano 2006-07-03 18:48:23 -07:00
parent 3f492ba1fc
commit 624314fda7

View File

@ -244,9 +244,9 @@ int git_config_bool(const char *name, const char *value)
return 1;
if (!*value)
return 0;
if (!strcasecmp(value, "true"))
if (!strcasecmp(value, "true") || !strcasecmp(value, "yes"))
return 1;
if (!strcasecmp(value, "false"))
if (!strcasecmp(value, "false") || !strcasecmp(value, "no"))
return 0;
return git_config_int(name, value) != 0;
}