Re: [PATCH] Add two grep config options
- From
Junio C Hamano <gitster@pobox.com>
- Date
- Mar 28, 2011, 18:39 UTC
- Message-ID
- <7vy63zxf6v.fsf@alter.siamese.dyndns.org>
- In-Reply-To
- <20110328172122.GA20817@sigill.intra.peff.net>
Jeff King <peff@peff.net> writes:
Show 6 quoted lines
> I dunno. I generally prefer to use extended regexps when I can, but I > don't remember ever having been annoyed that they are not the default > with git grep. Perhaps because 99% of my greps are for literal symbol > names (whereas in my editor, I am often doing substitutions, and I am > continually annoyed at having to use backslash to make my parentheses > magical).
I do not think I've ever been annoyed that "GNU grep" needs -E to enable extended regexps, either.
As much as I hate GREP_OPTIONS and GREP_COLORS environment variables that force us to write a "sane_grep" wrapper to run "grep" while disabling these, I have to admit that the approach to use these environment variables is far easier to disable than having a set of configuration variables that cover many commands we have, which is harder to disable selectively.
Having discussed all this, with an addition of --[no-]line-number synonym to the existing -n option, I don't think this particular incompatibility is a huge issue. At the worst, we might want to wait until a version bump like 1.8.0, but I personally think a prominent notice in the release notes in 1.7.5 would be sufficient.