From: Taylor Blau Date: Fri, 22 Jun 2018 15:49:39 +0000 (-0500) Subject: grep.[ch]: extend grep_opt to allow showing matched column X-Git-Tag: v2.19.0-rc0~156^2~4 X-Git-Url: https://git.lorimer.id.au/gitweb.git/diff_plain/017c0fcfdb21dd44e2c83f533e9a6d78513e7d8c?hp=017c0fcfdb21dd44e2c83f533e9a6d78513e7d8c grep.[ch]: extend grep_opt to allow showing matched column To support showing the matched column when calling 'git-grep(1)', teach 'grep_opt' the normal set of options to configure the default behavior and colorization of this feature. Now that we have opt->columnnum, use it to disable short-circuiting over ORs and ANDs so that col and icol are always filled with the earliest matches on each line. In addition, don't return the first match from match_line(), for the same reason. Signed-off-by: Taylor Blau Signed-off-by: Junio C Hamano ---