summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 747a322)
raw | patch | inline | side by side (parent: 747a322)
author | Nguyễn Thái Ngọc Duy <pclouds@gmail.com> | |
Mon, 16 Mar 2009 02:20:04 +0000 (13:20 +1100) | ||
committer | Junio C Hamano <gitster@pobox.com> | |
Wed, 18 Mar 2009 00:03:33 +0000 (17:03 -0700) |
As far as I know, not all grep programs support coloring, so we should
rely on builtin grep. If you want external grep, set
color.grep.external to empty string.
Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
rely on builtin grep. If you want external grep, set
color.grep.external to empty string.
Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
builtin-grep.c | patch | blob | history |
diff --git a/builtin-grep.c b/builtin-grep.c
index 9e7e766a496e44d3f5f266f24eb3430ae046235a..89489ddcf8edb85160036b0336ab4ce80c3cb6bc 100644 (file)
--- a/builtin-grep.c
+++ b/builtin-grep.c
}
}
+ if (opt.color && !opt.color_external)
+ builtin_grep = 1;
if (!opt.pattern_list)
die("no pattern given.");
if ((opt.regflags != REG_NEWLINE) && opt.fixed)