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

2018-07-02 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 o

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

2018-05-11 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 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 now,