git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: [PATCH] unset GREP_OPTIONS in test-lib.sh

From
Carlo Marcelo Arenas Belon <carenas@sajinet.com.pe>
Date
Nov 23, 2009, 11:22 UTC
Message-ID
<20091123112221.GA7175@sajinet.com.pe>
In-Reply-To
<4B095F91.8030305@lsrfire.ath.cx>
On Sun, Nov 22, 2009 at 04:58:09PM +0100, Ren? Scharfe wrote:
Show 13 quoted lines
> 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
Previous: René ScharfeNext: Junio C Hamano
Message 4 of 12 in “unset GREP_OPTIONS in test-lib.sh”
  1. unset GREP_OPTIONS in test-lib.shBert Wesarg, Nov 18, 2009
  2. Junio C HamanoNov 18, 2009
  3. René ScharfeNov 22, 2009
  4. Carlo Marcelo Arenas BelonNov 23, 2009
  5. Junio C HamanoNov 23, 2009
  6. René ScharfeNov 23, 2009
  7. mergetool--lib: simplify guess_merge_tool()René Scharfe, Nov 23, 2009
  8. David AguilarNov 27, 2009
  9. Junio C HamanoNov 23, 2009
  10. René ScharfeNov 23, 2009
  11. Junio C HamanoNov 24, 2009
  12. Bert WesargMar 7, 2010

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.