Allow users to un-configure rename detection
On Thu, 9 Apr 2009, Linus Torvalds wrote: > > [diff] > renames = no Btw, while doing this, I also though that "renames = on/off" made more sense, but while we allow yes/no and true/false for booleans, we don't allow on/off. Should we? Maybe. Here's a stupid patch. Linus Signed-off-by: Junio C Hamano <gitster@pobox.com>
Linus Torvalds committed
Apr 9, 2009 at 12:40 UTC
8f8c6fafd92fd547547bd7735e2d121a20997703
1 file changed
+2
-2
config.c
+2
-2
@@ -331,9 +331,9 @@ int git_config_bool_or_int(const char *name, const char *value, int *is_bool)
331
return 1;
332
if (!*value)
333
return 0;
334
- if (!strcasecmp(value, "true") || !strcasecmp(value, "yes"))
334
+ if (!strcasecmp(value, "true") || !strcasecmp(value, "yes") || !strcasecmp(value, "on"))
335
return 1;
336
- if (!strcasecmp(value, "false") || !strcasecmp(value, "no"))
336
+ if (!strcasecmp(value, "false") || !strcasecmp(value, "no") || !strcasecmp(value, "off"))
337
return 0;
338
*is_bool = 0;
339
return git_config_int(name, value);