From: Taylor Blau Date: Fri, 22 Jun 2018 15:49:45 +0000 (-0500) Subject: builtin/grep.c: add '--column' option to 'git-grep(1)' X-Git-Tag: v2.19.0-rc0~156^2~2 X-Git-Url: https://git.lorimer.id.au/gitweb.git/diff_plain/a449f27ffa08de1b01ab5e4fe7daac38f25c9515?hp=a449f27ffa08de1b01ab5e4fe7daac38f25c9515 builtin/grep.c: add '--column' option to 'git-grep(1)' Teach 'git-grep(1)' a new option, '--column', to show the column number of the first match on a non-context line. This makes it possible to teach 'contrib/git-jump/git-jump' how to seek to the first matching position of a grep match in your editor, and allows similar additional scripting capabilities. For example: $ git grep -n --column foo | head -n3 .clang-format:51:14:# myFunction(foo, bar, baz); .clang-format:64:7:# int foo(); .clang-format:75:8:# void foo() Signed-off-by: Taylor Blau Signed-off-by: Junio C Hamano ---