Subject: [PATCH 0/2] grep.c: teach --only-matching to 'git-grep(1)'

From: Taylor Blau <[email-masked]>
Date: Mon, 25 Jun 2018 16:25:51 -0500

Hi,

Attached is a resurrection of my previous topic [1] to add
'--only-matching' (in the style of GNU grep) to 'git grep'.

The changes are described in detail in each of the attached patches.

Similar to the series to add --column to 'git grep', I have restarted
this thread in order to not clutter the old one. I rewrote the patches
from scratch today, and have based them on tb/grep-colno, on top of
which they should apply cleanly.

Thanks in advance for your kind review :-).

Thanks,
Taylor

[1]: https://public-inbox.org/git/[email-masked]/

Taylor Blau (2):
  grep.c: extract show_line_header()
  grep.c: teach 'git grep --only-matching'

 builtin/grep.c  |  6 ++++
 grep.c          | 90 +++++++++++++++++++++++++++++++------------------
 grep.h          |  1 +
 t/t7810-grep.sh | 15 +++++++++
 4 files changed, 79 insertions(+), 33 deletions(-)

--
2.18.0