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

Re: git grep '(' = segfault

From
Junio C Hamano <gitster@pobox.com>
Date
Apr 27, 2009, 23:18 UTC
Message-ID
<7vd4axwurv.fsf@gitster.siamese.dyndns.org>
In-Reply-To
<40aa078e0904271202ye89ebf2wf417c623d8fe5689@mail.gmail.com>
Erik Faye-Lund <kusmabite@googlemail.com> writes:
> Yeah, thanks for explaining. But isn't this functionality kind of
> redundant since we have the -E switch?
> As far as I can see, "git grep -E "(bar|boz)" should do the same thing
> as "git grep -e foo --and '(' -e bar --or -e boz ')'"...
With -E, --or is not strictly necessary.

With only -E, however, it is cumbersome to express what --and can. Once you learn the handiness of --and, naturally you would start wanting to be able to say --or (especially if you do not even know about -E).

Previous: Erik Faye-LundNext: Michał Kiedrowicz
Message 8 of 9 in “git grep '(' = segfault”
  1. Dmitry PotapovApr 27, 2009
  2. Linus TorvaldsApr 27, 2009
  3. Erik Faye-LundApr 27, 2009
  4. Linus TorvaldsApr 27, 2009
  5. Erik Faye-LundApr 27, 2009
  6. Matthieu MoyApr 27, 2009
  7. Erik Faye-LundApr 27, 2009
  8. Junio C HamanoApr 27, 2009
  9. Michał KiedrowiczApr 27, 2009

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.