summaryrefslogtreecommitdiff
path: root/Documentation/git-grep.txt
diff options
context:
space:
mode:
authorRené Scharfe <rene.scharfe@lsrfire.ath.cx>2011-08-01 19:22:52 +0200
committerJunio C Hamano <gitster@pobox.com>2011-08-01 16:11:50 -0700
commit317f63c21c8eac46813eacf487485445f2f79a6d (patch)
tree2a96218e0b83f25efaea60685dc89dca0e4687b5 /Documentation/git-grep.txt
parentba8ea7496f2b95c49fccb72ed6b332afbd865e7b (diff)
downloadgit-317f63c21c8eac46813eacf487485445f2f79a6d.tar.gz
grep: long context options
Take long option names for -A (--after-context), -B (--before-context) and -C (--context) from GNU grep and add a similar long option name for -W (--function-context). Signed-off-by: Rene Scharfe <rene.scharfe@lsrfire.ath.cx> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'Documentation/git-grep.txt')
-rw-r--r--Documentation/git-grep.txt26
1 files changed, 17 insertions, 9 deletions
diff --git a/Documentation/git-grep.txt b/Documentation/git-grep.txt
index 6cd0c503f6..af501d2424 100644
--- a/Documentation/git-grep.txt
+++ b/Documentation/git-grep.txt
@@ -155,15 +155,6 @@ OPTIONS
Show the filename above the matches in that file instead of
at the start of each shown line.
--[ABC] <context>::
- Show `context` trailing (`A` -- after), or leading (`B`
- -- before), or both (`C` -- context) lines, and place a
- line containing `--` between contiguous groups of
- matches.
-
--<num>::
- A shortcut for specifying `-C<num>`.
-
-p::
--show-function::
Show the preceding line that contains the function name of
@@ -172,7 +163,24 @@ OPTIONS
patch hunk headers (see 'Defining a custom hunk-header' in
linkgit:gitattributes[5]).
+-<num>::
+-C <num>::
+--context <num>::
+ Show <num> leading and trailing lines, and place a line
+ containing `--` between contiguous groups of matches.
+
+-A <num>::
+--after-context <num>::
+ Show <num> trailing lines, and place a line containing
+ `--` between contiguous groups of matches.
+
+-B <num>::
+--before-context <num>::
+ Show <num> leading lines, and place a line containing
+ `--` between contiguous groups of matches.
+
-W::
+--function-context::
Show the surrounding text from the previous line containing a
function name up to the one before the next function name,
effectively showing the whole function in which the match was