Skip to content

Commit

Permalink
grep: don't support "grep.color"-like config options
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Markus Heidelberg authored and Junio C Hamano committed Apr 21, 2009
1 parent 680ebc0 commit fe3420b
Showing 1 changed file with 3 additions and 6 deletions.
9 changes: 3 additions & 6 deletions builtin-grep.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit fe3420b

Please sign in to comment.