summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 680ebc0)
raw | patch | inline | side by side (parent: 680ebc0)
author | Markus Heidelberg <markus.heidelberg@web.de> | |
Mon, 20 Apr 2009 22:58:15 +0000 (00:58 +0200) | ||
committer | Junio C Hamano <gitster@pobox.com> | |
Tue, 21 Apr 2009 05:55:56 +0000 (22:55 -0700) |
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>
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>
builtin-grep.c | patch | blob | history |
diff --git a/builtin-grep.c b/builtin-grep.c
index 89489ddcf8edb85160036b0336ab4ce80c3cb6bc..f88a912ace9195c387566770432a904e2d7adcb7 100644 (file)
--- a/builtin-grep.c
+++ b/builtin-grep.c
{
struct grep_opt *opt = cb;
- if (!strcmp(var, "grep.color") || !strcmp(var, "color.grep")) {
+ if (!strcmp(var, "color.grep")) {
opt->color = git_config_colorbool(var, value, -1);
return 0;
}
- if (!strcmp(var, "grep.color.external") ||
- !strcmp(var, "color.grep.external")) {
+ if (!strcmp(var, "color.grep.external"))
return git_config_string(&(opt->color_external), var, value);
- }
- if (!strcmp(var, "grep.color.match") ||
- !strcmp(var, "color.grep.match")) {
+ if (!strcmp(var, "color.grep.match")) {
if (!value)
return config_error_nonbool(var);
color_parse(value, var, opt->color_match);