grep: don't support "grep.color"-like config options
color.grep and color.grep.* is the official and documented way to highlight grep matches. Comparable options like diff.color.* and status.color.* exist for backward compatibility reasons only and are not documented any more. Signed-off-by: Markus Heidelberg <markus.heidelberg@web.de> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Markus Heidelberg committed
Apr 21, 2009 at 00:58 UTC
fe3420b616eba8027b080dc81020b0e0990f4809
1 file changed
+3
-6
builtin-grep.c
+3
-6
@@ -26,16 +26,13 @@ static int grep_config(const char *var, const char *value, void *cb)
26
{
27
struct grep_opt *opt = cb;
28
29
- if (!strcmp(var, "grep.color") || !strcmp(var, "color.grep")) {
29
+ if (!strcmp(var, "color.grep")) {
30
opt->color = git_config_colorbool(var, value, -1);
31
return 0;
32
}
33
- if (!strcmp(var, "grep.color.external") ||
34
- !strcmp(var, "color.grep.external")) {
33
+ if (!strcmp(var, "color.grep.external"))
34
return git_config_string(&(opt->color_external), var, value);
36
- }
37
- if (!strcmp(var, "grep.color.match") ||
38
- !strcmp(var, "color.grep.match")) {
35
+ if (!strcmp(var, "color.grep.match")) {
36
if (!value)
37
return config_error_nonbool(var);
38
color_parse(value, var, opt->color_match);