grep: add option to show whole function as context
[gitweb.git] / Documentation / git-grep.txt
index e150c77cffb5d082822bd65c7bfbeb1f431fc42f..6cd0c503f63c2e2ffe49ef5ffc7e64677ae721cd 100644 (file)
@@ -148,6 +148,13 @@ OPTIONS
        gives the default to color output.
        Same as `--color=never`.
 
+--break::
+       Print an empty line between matches from different files.
+
+--heading::
+       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
@@ -165,6 +172,12 @@ OPTIONS
        patch hunk headers (see 'Defining a custom hunk-header' in
        linkgit:gitattributes[5]).
 
+-W::
+       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
+       found.
+
 -f <file>::
        Read patterns from <file>, one per line.