git/list[1] front-page[2] threads[3] people[4] search[5] about
 

[PATCH] grep: don't support "grep.color"-like config options

From
Markus Heidelberg <markus.heidelberg@web.de>
Date
Apr 20, 2009, 22:58 UTC
Message-ID
<1240268295-10296-1-git-send-email-markus.heidelberg@web.de>

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
Next: Johannes Schindelin
Message 1 of 6 in “grep: don't support "grep.color"-like config options”
  1. grep: don't support "grep.color"-like config optionsMarkus Heidelberg, Apr 20, 2009
  2. Johannes SchindelinApr 20, 2009
  3. Markus HeidelbergApr 21, 2009
  4. Junio C HamanoApr 21, 2009
  5. Markus HeidelbergApr 21, 2009
  6. René ScharfeApr 21, 2009

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.