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