[PATCH 1/2] grep.c: extract show_line_header()

2018-06-25 Thread Taylor Blau
The grep code invokes show_line() to display the contents of a matched or context line in its output. Part of this execution is to print a line header that includes information such as the kind, the line- and column-number and etc. of that match. To prepare for the addition of an option to print

Re: [PATCH 1/2] grep.c: extract show_line_header()

2018-05-07 Thread Taylor Blau
On Sat, May 05, 2018 at 03:30:51AM -0400, Eric Sunshine wrote: > On Sat, May 5, 2018 at 12:03 AM, Taylor Blau wrote: > > Teach 'git-grep(1)' how to print a line header multiple times from > > show_line() in preparation for it learning '--only-matching'. > > > >

Re: [PATCH 1/2] grep.c: extract show_line_header()

2018-05-05 Thread Eric Sunshine
On Sat, May 5, 2018 at 12:03 AM, Taylor Blau wrote: > Teach 'git-grep(1)' how to print a line header multiple times from > show_line() in preparation for it learning '--only-matching'. > > show_line_header() comprises of the code in show_line() executed in s/of// > order to

[PATCH 1/2] grep.c: extract show_line_header()

2018-05-04 Thread Taylor Blau
Teach 'git-grep(1)' how to print a line header multiple times from show_line() in preparation for it learning '--only-matching'. show_line_header() comprises of the code in show_line() executed in order to produce a line header. It is a one-for-one extraction of the existing implementation. For