[PATCH 0/2] grep.c: teach --only-matching to 'git-grep(1)'
- From
Taylor Blau <me@ttaylorr.com>
- Date
- Jun 25, 2018, 21:25 UTC
- Message-ID
- <cover.1529961706.git.me@ttaylorr.com>
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/cover.1525492696.git.me@ttaylorr.com/
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