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

Re: bug: git grep -P and multiline mode

From
Noel Grandin <noelgrandin@gmail.com>
Date
Jun 24, 2014, 07:34 UTC
Message-ID
<53A92A14.8010607@gmail.com>
In-Reply-To
<xmqqa993cykl.fsf@gitster.dls.corp.google.com>
On 2014-06-23 07:42 PM, Junio C Hamano wrote:
Show 7 quoted lines
> 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'?"
>
>
Ah, that is a pity.
I find the multi-line mode very useful for finding code problems that span multiple lines.

I'm sure there are other options that conflict, and the solution is to normally write out some kind of informative error message?

Anyhow, since I'm too busy working on LibreOffice right now to work up a patch for git, I'll stick to using
     find | xargs grep
:-)
Previous: Junio C Hamano
Message 3 of 3 in “bug: git grep -P and multiline mode”
  1. Noel GrandinJun 23, 2014
  2. Junio C HamanoJun 23, 2014
  3. Noel GrandinJun 24, 2014

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.