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

Re: [PATCH v2 0/7] Tying loose ends on grep-pcre

From
Michael Haggerty <mhagger@alum.mit.edu>
Date
Oct 11, 2012, 07:08 UTC
Message-ID
<50767073.50800@alum.mit.edu>
In-Reply-To
<7vlifeclrh.fsf@alter.siamese.dyndns.org>
On 10/10/2012 06:52 PM, Junio C Hamano wrote:
Show 21 quoted lines
> Michael Haggerty <mhagger@alum.mit.edu> writes:
> 
>>> The last one teaches "git log" family to honor the "grep.*"
>>> configuration variables, e.g. "grep.patterntype", so that you can
>>> say "git -c grep.patterntype=perl log --grep='(?:pcre)'".
>>
>> Maybe this has been discussed already, but it seems to me that adding a
>> persistent setting that affects how "git log --grep" interprets the
>> pattern argument could break some scripts that assume that the "old"
>> interpretation is always used.  Shouldn't this at least be documented as
>> a backwards incompatibility?
> 
> If somebody scripts around "log" with hardcoded query "--grep=..."
> strings, they can force a particular variant from such a command
> line at the same time.  But as always, responsibility of doing so is
> on the person who writes such a script; "log" being a Porcelain, we
> value ease-of-use in interactive case more than cast-in-stone
> interface stability like we do for plumbing commands.
> 
> And that is exactly why the series avoids changing the behaviour for
> the "rev-list" plumbing.
OK, you've convinced me.  Thanks.
Michael
-- 
Michael Haggerty
mhagger@alum.mit.edu
http://softwareswirl.blogspot.com/
Previous: Junio C Hamano
Message 11 of 11 in “Tying loose ends on grep-pcre”
  1. 0/7 Tying loose ends on grep-pcreJunio C Hamano, Oct 10, 2012
  2. 1/7 builtin/grep.c: make configuration callback more reusableJunio C Hamano, Oct 10, 2012
  3. 2/7 grep: move the configuration parsing logic to grep.[ch]Junio C Hamano, Oct 10, 2012
  4. 3/7 grep: move pattern-type bits support to top-level grep.[ch]Junio C Hamano, Oct 10, 2012
  5. 4/7 revisions: initialize revs->grep_filter using grep_init()Junio C Hamano, Oct 10, 2012
  6. 5/7 log --grep: use the same helper to set -E/-F options as "git grep"Junio C Hamano, Oct 10, 2012
  7. 6/7 log --grep: accept --basic-regexp and --perl-regexpJunio C Hamano, Oct 10, 2012
  8. 7/7 log: honor grep.* configurationJunio C Hamano, Oct 10, 2012
  9. Michael HaggertyOct 10, 2012
  10. Junio C HamanoOct 10, 2012
  11. Michael HaggertyOct 11, 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.