git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] grep: don't support "grep.color"-like config options
@ 2009-04-20 22:58 Markus Heidelberg
  2009-04-20 23:45 ` Johannes Schindelin
  0 siblings, 1 reply; 6+ messages in thread
From: Markus Heidelberg @ 2009-04-20 22:58 UTC (permalink / raw)
  To: Junio C Hamano; +Cc: git, Markus Heidelberg

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>
---
 builtin-grep.c |    9 +++------
 1 files changed, 3 insertions(+), 6 deletions(-)

diff --git a/builtin-grep.c b/builtin-grep.c
index 89489dd..f88a912 100644
--- a/builtin-grep.c
+++ b/builtin-grep.c
@@ -26,16 +26,13 @@ static int grep_config(const char *var, const char *value, void *cb)
 {
 	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);
-- 
1.6.3.rc1.44.g269729

^ permalink raw reply related	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2009-04-21 15:48 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-04-20 22:58 [PATCH] grep: don't support "grep.color"-like config options Markus Heidelberg
2009-04-20 23:45 ` Johannes Schindelin
2009-04-21  0:11   ` Markus Heidelberg
2009-04-21  5:55   ` Junio C Hamano
2009-04-21  7:57     ` Markus Heidelberg
2009-04-21 15:45     ` René Scharfe

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).