On Sun, Nov 22, 2009 at 04:58:09PM +0100, Ren? Scharfe wrote: > Junio C Hamano schrieb: > > Do we kill that environment variable when we call out to external grep in > > grep.c? If not, we should. An alternative is to teach our internal one > > to also honor it, but I personally do not find it too attractive to mimic > > the design mistake of GREP_OPTIONS myself. > > We don't. Here's a patch with a simple test case that makes git grep > unset GREP_OPTIONS before it calls the external grep. > > While we're at it, also unset GREP_COLOR and GREP_COLORS in case > colouring is not enabled, to be on the safe side. The presence of > these variables alone is not sufficient to trigger coloured output with > GNU grep, but other implementations may behave differently. why not better to apply the proposed patch from Junio in : http://article.gmane.org/gmane.comp.version-control.git/127980/ it would IMHO correct all reported issues and serve as well as a catch all from other tools that could be introduced in the future and that will be similarly affected by this misfeature. Carlo -- To unsubscribe from this list: send the line "unsubscribe git" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html