Re: bug: git grep -P and multiline mode
- From
Junio C Hamano <gitster@pobox.com>
- Date
- Jun 23, 2014, 17:42 UTC
- Message-ID
- <xmqqa993cykl.fsf@gitster.dls.corp.google.com>
- In-Reply-To
- <53A7CF25.7060508@gmail.com>
Noel Grandin <noelgrandin@gmail.com> writes:
> It looks like the perl regular expression multiline mode does not work with 'git grep'
Yes, and deliberately so, to avoid having to think about things like "how would a multi-line match interact with 'grep -n'?"
We behave as if we feed each line of the contents one line at a time to the matching engine that is chosen by the -P/-E/-G/-F optoins, so this limitation is unlikely to change.