author | René Scharfe <rene.scharfe@lsrfire.ath.cx> | |
Wed, 1 Jul 2009 22:06:34 +0000 (00:06 +0200) | ||
committer | Junio C Hamano <gitster@pobox.com> | |
Thu, 2 Jul 2009 02:16:49 +0000 (19:16 -0700) | ||
commit | 2944e4e6145bdfcb1a8730d7da671786d72c86ed | |
tree | a0a293f3b48ec4a732eb4f1743f8cf6b15b041d1 | tree | snapshot |
parent | 49de3216983cc921ea66ade18a8521d4d74bbf3f | commit | diff |
grep: add option -p/--show-function
The new option -p instructs git grep to print the previous function
definition as a context line, similar to diff -p. Such context lines
are marked with an equal sign instead of a dash. This option
complements the existing context options -A, -B, -C.
Function definitions are detected using the same heuristic that diff
uses. User defined regular expressions are not supported, yet.
Signed-off-by: Rene Scharfe <rene.scharfe@lsrfire.ath.cx>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
The new option -p instructs git grep to print the previous function
definition as a context line, similar to diff -p. Such context lines
are marked with an equal sign instead of a dash. This option
complements the existing context options -A, -B, -C.
Function definitions are detected using the same heuristic that diff
uses. User defined regular expressions are not supported, yet.
Signed-off-by: Rene Scharfe <rene.scharfe@lsrfire.ath.cx>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Documentation/git-grep.txt | diff | blob | history | |
builtin-grep.c | diff | blob | history | |
grep.c | diff | blob | history | |
grep.h | diff | blob | history | |
t/t7002-grep.sh | diff | blob | history |