git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Junio C Hamano <gitster@pobox.com>
To: git@vger.kernel.org
Subject: [PATCH v2 0/7] Tying loose ends on grep-pcre
Date: Wed, 10 Oct 2012 00:55:07 -0700	[thread overview]
Message-ID: <1349855714-17008-1-git-send-email-gitster@pobox.com> (raw)

It took longer than expected, but here is a reroll of the previous
series to bring more recent "git grep" enhancements to the "--grep"
option of commands in "git log" family.

The early part of the series (1-3) refactors the code that reads
configuration items related to "grep" and the code that mixes the
result with the command line options to prepare grep_opt, which so
far lived in builtin/grep.c, and moves them to the grep.[ch] at the
top-level.

The middle part (4-6) reuses the code to set-up grep_opt refactored
by the earlier part of the series on revs->grep_filter that is used
in "git log --grep=..." processing.  It incidentally fixes a small
bug where "git log -F -E --grep='<ere>'" did not look for matches to
the pattern in extended regular expression, and adds --basic-regexp
and --perl-regexp command line options to "git log" family for
completeness.

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)'".

Obviously, it is too late for this cycle and will not graduate to
'master' before the 1.8.0 final.


Junio C Hamano (7):
  builtin/grep.c: make configuration callback more reusable
  grep: move the configuration parsing logic to grep.[ch]
  grep: move pattern-type bits support to top-level grep.[ch]
  revisions: initialize revs->grep_filter using grep_init()
  log --grep: use the same helper to set -E/-F options as "git grep"
  log --grep: accept --basic-regexp and --perl-regexp
  log: honor grep.* configuration

 Documentation/rev-list-options.txt |  10 +++
 builtin/grep.c                     | 133 ++--------------------------
 builtin/log.c                      |   8 +-
 grep.c                             | 177 +++++++++++++++++++++++++++++++++++++
 grep.h                             |   6 ++
 revision.c                         |  14 ++-
 t/t4202-log.sh                     |   6 ++
 7 files changed, 225 insertions(+), 129 deletions(-)

-- 
1.8.0.rc1.76.g5a375e6

             reply	other threads:[~2012-10-10  7:55 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-10-10  7:55 Junio C Hamano [this message]
2012-10-10  7:55 ` [PATCH v2 1/7] builtin/grep.c: make configuration callback more reusable Junio C Hamano
2012-10-10  7:55 ` [PATCH v2 2/7] grep: move the configuration parsing logic to grep.[ch] Junio C Hamano
2012-10-10  7:55 ` [PATCH v2 3/7] grep: move pattern-type bits support to top-level grep.[ch] Junio C Hamano
2012-10-10  7:55 ` [PATCH v2 4/7] revisions: initialize revs->grep_filter using grep_init() Junio C Hamano
2012-10-10  7:55 ` [PATCH v2 5/7] log --grep: use the same helper to set -E/-F options as "git grep" Junio C Hamano
2012-10-10  7:55 ` [PATCH v2 6/7] log --grep: accept --basic-regexp and --perl-regexp Junio C Hamano
2012-10-10  7:55 ` [PATCH v2 7/7] log: honor grep.* configuration Junio C Hamano
2012-10-10 15:17 ` [PATCH v2 0/7] Tying loose ends on grep-pcre Michael Haggerty
2012-10-10 16:52   ` Junio C Hamano
2012-10-11  7:08     ` Michael Haggerty

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1349855714-17008-1-git-send-email-gitster@pobox.com \
    --to=gitster@pobox.com \
    --cc=git@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).