Skip to content

Commit 85d006c

Browse files
gregkhvrothberg
authored andcommitted
Fix 'git grep' color issue.
It should be "--color=auto" not "--color=always" as newer versions of git will really set the output to color even if it is a pipe like is happening in vgrep. Fixes a regression in not working properly with newer versions of git. Signed-off-by: Greg Kroah-Hartman <[email protected]>
1 parent c039117 commit 85d006c

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

vgrep.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -300,7 +300,7 @@ func (v *vgrep) grep(args []string) {
300300
env = "HOME="
301301
cmd = []string{
302302
"git", "-c", "color.grep.match=red bold",
303-
"grep", "-z", "-In", "--color=always",
303+
"grep", "-z", "-In", "--color=auto",
304304
}
305305
cmd = append(cmd, args...)
306306
greptype = GITGrep

0 commit comments

Comments
 (0)