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

problem with git grep -P

From
Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
Date
Feb 15, 2012, 13:15 UTC
Message-ID
<4F3BAFD4.7080209@in.waw.pl>

Hi, I'm not getting output from git grep -P. Simplified test case:

$ git grep -P '^ ' t/t4012-diff-binary.sh (nothing)

$ git grep -E '^ ' t/t4012-diff-binary.sh t/t4012-diff-binary.sh: a | 2 +- t/t4012-diff-binary.sh: b | Bin t/t4012-diff-binary.sh: c | 2 +- t/t4012-diff-binary.sh: d | Bin t/t4012-diff-binary.sh: 4 files changed, 2 insertions(+), 2 deletions(-) t/t4012-diff-binary.sh: binfile | Bin 0 -> 1026 bytes t/t4012-diff-binary.sh: textfile | 10000 +++++++++++++++++++++++++++++++

I would expect -P to give the same results as -E.
Am I missing something special about pcre?

$ git --version git version 1.7.9.5.g1210a (AFAICT this hasn't changed since grep -P was merged)

I have libpcre3 8.12-4 from debian.

-- Zbyszek

Message 1 of 1 in “problem with git grep -P”
  1. Zbigniew Jędrzejewski-SzmekFeb 15, 2012

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.