Merge branch 'jc/grep-pcre-loose-ends'

"git log -F -E --grep='<ere>'" failed to use the given <ere>
pattern as extended regular expression, and instead looked for the
string literally.  The early part of this series is a fix for it;
the latter part teaches log to respect the grep.* configuration.

* jc/grep-pcre-loose-ends:
  log: honor grep.* configuration
  log --grep: accept --basic-regexp and --perl-regexp
  log --grep: use the same helper to set -E/-F options as "git grep"
  revisions: initialize revs->grep_filter using grep_init()
  grep: move pattern-type bits support to top-level grep.[ch]
  grep: move the configuration parsing logic to grep.[ch]
  builtin/grep.c: make configuration callback more reusable
This commit is contained in:
Jeff King
2012-10-29 04:12:15 -04:00
7 changed files with 225 additions and 129 deletions

View File

@ -79,6 +79,11 @@ if it is part of the log message.
Match the regexp limiting patterns without regard to letters case.
--basic-regexp::
Consider the limiting patterns to be basic regular expressions;
this is the default.
-E::
--extended-regexp::
@ -91,6 +96,11 @@ if it is part of the log message.
Consider the limiting patterns to be fixed strings (don't interpret
pattern as a regular expression).
--perl-regexp::
Consider the limiting patterns to be Perl-compatible regexp.
Requires libpcre to be compiled in.
--remove-empty::
Stop when a given path disappears from the tree.