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

Re: [PATCH] RFC Allow case insensitive search flag with git-grep for fixed-strings

From
Jeff King <peff@peff.net>
Date
Nov 6, 2009, 08:48 UTC
Message-ID
<20091106084855.GA20964@coredump.intra.peff.net>
In-Reply-To
<B7C4E16C-B15D-4A7B-873A-B6BD0FDAD8C8@gmail.com>
On Thu, Oct 29, 2009 at 06:21:59PM -0700, Brian Collins wrote:
> You will have to excuse me, this is my first patch and I don't know
> if this is the right place to post this. Apologies in advance if I'm
> in the wrong place.

You're in the right place (though judging from the response, nobody seemed to find your patch all that interesting...).

> git-grep currently throws an error when you combine the -F and -i
> flags. This isn't in line with how GNU grep handles it. This patch
> allows the simultaneous use of those flags.

I don't see a reason not to allow this combination if our grep implementation supports it. My only reservation would be that we sometimes call out to an external grep, and non-GNU grep might barf on this. But I think that is OK, as the user should get a sane error from the external grep.

>  builtin-grep.c |    8 +++++---
>  grep.c         |   16 ++++++++++++----
>  grep.h         |    2 ++

Tests? They help prove to us that your feature works, and also prevent us from accidentally breaking your feature in the future.

-Peff
Previous: Brian CollinsNext: Brian Collins
Message 2 of 13 in “RFC Allow case insensitive search flag with git-grep for fixed-strings”
  1. RFC Allow case insensitive search flag with git-grep for fixed-stringsBrian Collins, Oct 30, 2009
  2. Jeff KingNov 6, 2009
  3. Brian CollinsNov 6, 2009
  4. Junio C HamanoNov 6, 2009
  5. Jeff KingNov 6, 2009
  6. Junio C HamanoNov 7, 2009
  7. Nanako ShiraishiNov 16, 2009
  8. Jeff KingNov 16, 2009
  9. Brian CollinsNov 16, 2009
  10. Brandon CaseyNov 16, 2009
  11. Junio C HamanoNov 16, 2009
  12. Junio C HamanoNov 17, 2009
  13. Jeff KingNov 17, 2009

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.