summary refs log tree commit diff
path: root/grep.c
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2022-01-10 11:52:54 -0800
committerJunio C Hamano <gitster@pobox.com>2022-01-10 11:52:54 -0800
commitc0450ca09864baae1cd80b746500aaef2eeda956 (patch)
tree29e5efd68fd35775d23a16eeedcb121a1b9d5014 /grep.c
parent0669bdf4ebc095a2b26654292e1ff38245ccf88a (diff)
parentb83f99c3990cc9080ec8f5459555069d47e4cdfb (diff)
Merge branch 'lh/use-gnu-color-in-grep'
The color palette used by "git grep" has been updated to match that
of GNU grep.

* lh/use-gnu-color-in-grep:
  grep: align default colors with GNU grep ones
Diffstat (limited to 'grep.c')
-rw-r--r--grep.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/grep.c b/grep.c
index 47c75ab7fb..7bb0360869 100644
--- a/grep.c
+++ b/grep.c
@@ -26,10 +26,10 @@ static struct grep_opt grep_defaults = {
 	.pattern_type_option = GREP_PATTERN_TYPE_UNSPECIFIED,
 	.colors = {
 		[GREP_COLOR_CONTEXT] = "",
-		[GREP_COLOR_FILENAME] = "",
+		[GREP_COLOR_FILENAME] = GIT_COLOR_MAGENTA,
 		[GREP_COLOR_FUNCTION] = "",
-		[GREP_COLOR_LINENO] = "",
-		[GREP_COLOR_COLUMNNO] = "",
+		[GREP_COLOR_LINENO] = GIT_COLOR_GREEN,
+		[GREP_COLOR_COLUMNNO] = GIT_COLOR_GREEN,
 		[GREP_COLOR_MATCH_CONTEXT] = GIT_COLOR_BOLD_RED,
 		[GREP_COLOR_MATCH_SELECTED] = GIT_COLOR_BOLD_RED,
 		[GREP_COLOR_SELECTED] = "",