]> git.ipfire.org Git - thirdparty/git.git/commit
grep: align default colors with GNU grep ones
authorLénaïc Huard <lenaic@lhuard.fr>
Wed, 5 Jan 2022 08:18:35 +0000 (09:18 +0100)
committerJunio C Hamano <gitster@pobox.com>
Wed, 5 Jan 2022 20:42:54 +0000 (12:42 -0800)
commitb83f99c3990cc9080ec8f5459555069d47e4cdfb
treee4f73bf07bd96454dab7453d30549442f05a5468
parent69a9c10c95e28df457e33b3c7400b16caf2e2962
grep: align default colors with GNU grep ones

git-grep shares a lot of options with the standard grep tool.
Like GNU grep, it has coloring options to highlight the matching text.
And like it, it has options to customize the various colored parts.

This patch updates the default git-grep colors to make them match the
GNU grep default ones [1].

It was possible to get the same result by setting the various `color.grep.<slot>`
options, but this patch makes `git grep --color` share the same color scheme as
`grep --color` by default without any user configuration.

[1] https://www.man7.org/linux/man-pages/man1/grep.1.html#ENVIRONMENT

Signed-off-by: Lénaïc Huard <lenaic@lhuard.fr>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
grep.c