All of lore.kernel.org
 help / color / mirror / Atom feed
From: Taylor Blau <me@ttaylorr.com>
To: git@vger.kernel.org
Cc: sunshine@sunshineco.com, avarab@gmail.com, peff@peff.net,
	gitster@pobox.com
Subject: [PATCH v2 0/2] builtin/grep.c: teach '-o', '--only-matching'
Date: Fri, 11 May 2018 20:21:03 -0700	[thread overview]
Message-ID: <cover.1526094978.git.me@ttaylorr.com> (raw)
In-Reply-To: <cover.1525492696.git.me@ttaylorr.com>

Hi,

Attached is the second re-roll of my series to add GNU grep's
'--only-matching' to git-grep.

The main thing that has changed since last time is our handling of
-{A,B,C}<N>. Previously, as Peff points out in [1], we handle this in a
buggy way different than GNU.

I agree that although 'git grep -C<N> -o ...' is an unusual invocation,
it is useful to (1) maintain as much consistency as reasonably makes
sense, and (2) to at least not be buggy.

I have also responded to Eric's suggestions in [2], and [3].

Thanks as always for your kind review :-).


Thanks,
Taylor

[1]: https://public-inbox.org/git/20180510064014.GA31779@sigill.intra.peff.net
[2]: https://public-inbox.org/git/CAPig+cSRJWW4-7vj6wK8aOfNB20bqUCSOOySjdPci1r5Vb83Uw@mail.gmail.com
[3]: https://public-inbox.org/git/CAPig+cRbBZ+QTqGiW_wQ9E-gROA-Wtevp1vcRqmJ5YQJ8tYEVQ@mail.gmail.com

Taylor Blau (2):
  grep.c: extract show_line_header()
  builtin/grep.c: teach '-o', '--only-matching' to 'git-grep'

 Documentation/git-grep.txt |  6 ++-
 builtin/grep.c             |  1 +
 grep.c                     | 78 +++++++++++++++++++++++++++-----------
 grep.h                     |  1 +
 t/t7810-grep.sh            | 69 +++++++++++++++++++++++++++++++++
 5 files changed, 132 insertions(+), 23 deletions(-)

--
2.17.0

  parent reply	other threads:[~2018-05-12  3:21 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-05-05  4:03 [PATCH 0/2] builtin/grep.c: teach '-o', '--only-matching' Taylor Blau
2018-05-05  4:03 ` [PATCH 1/2] grep.c: extract show_line_header() Taylor Blau
2018-05-05  7:30   ` Eric Sunshine
2018-05-08  0:24     ` Taylor Blau
2018-05-05  4:03 ` [PATCH 2/2] builtin/grep.c: teach '-o', '--only-matching' to 'git-grep' Taylor Blau
2018-05-05  6:49   ` Ævar Arnfjörð Bjarmason
2018-05-08 17:25     ` Jeff King
2018-05-10  2:00       ` Taylor Blau
2018-05-10  6:40         ` Jeff King
2018-05-05  7:36   ` Eric Sunshine
2018-05-08  0:27     ` Taylor Blau
2018-05-12  3:21 ` Taylor Blau [this message]
2018-05-12  3:21   ` [PATCH v2 1/2] grep.c: extract show_line_header() Taylor Blau
2018-05-12  3:21   ` [PATCH v2 2/2] builtin/grep.c: teach '-o', '--only-matching' to 'git-grep' Taylor Blau

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=cover.1526094978.git.me@ttaylorr.com \
    --to=me@ttaylorr.com \
    --cc=avarab@gmail.com \
    --cc=git@vger.kernel.org \
    --cc=gitster@pobox.com \
    --cc=peff@peff.net \
    --cc=sunshine@sunshineco.com \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.