Re: [PATCH 4/6] log --grep: accept --basic-regexp and --perl-regexp
- From
Junio C Hamano <gitster@pobox.com>
- Date
- Oct 4, 2012, 16:44 UTC
- Message-ID
- <7vk3v6191h.fsf@alter.siamese.dyndns.org>
- In-Reply-To
- <20121004081212.GC31305@sigill.intra.peff.net>
Jeff King <peff@peff.net> writes:
Show 7 quoted lines
>> + } else if (!strcmp(arg, "--perl-regexp") || !strcmp(arg, "-P")) {
>> + grep_set_pattern_type_option(GREP_PATTERN_TYPE_PCRE, &revs->grep_filter);
>
> Do we want to yield short-and-sweet "-P" to perl-regexp? git-grep does
> so to match GNU grep, but we are not matching anything here (except
> ourselves in git-grep). I'd think most people who use it regularly would
> just set grep.patternType.My instinct always is that we should not to add short-and-sweet one letter option until it is known to be necessary and useful; the above was me typing without thinkng. And I agree grep.patternType should be sufficient.