From: Nazri Ramliy Date: Fri, 02 Jul 2010 10:02:21 GMT Subject: [PATCH] Bugfix: grep: Do not colorize output when -O is set Message-ID: <1278064941-30689-1-git-send-email-ayiehere@gmail.com> When color.ui is set to auto, "git grep -Ovi foo" breaks due to the presence of color escape sequences. Signed-off-by: Nazri Ramliy --- Breakage aside, 'git grep -Ovi' really rocks! builtin/grep.c | 1 + 1 files changed, 1 insertions(+), 0 deletions(-) diff --git a/builtin/grep.c b/builtin/grep.c index 232cd1c..597f76b 100644 --- a/builtin/grep.c +++ b/builtin/grep.c @@ -1001,6 +1001,7 @@ int cmd_grep(int argc, const char **argv, const char *prefix) if (show_in_pager == default_pager) show_in_pager = git_pager(1); if (show_in_pager) { + opt.color = 0; opt.name_only = 1; opt.null_following_name = 1; opt.output_priv = &path_list; -- 1.7.1.245.g7c42e.dirty