X-Git-Url: https://git.tokkee.org/?a=blobdiff_plain;f=Documentation%2Fgit-grep.txt;h=8c700200f55e1a92545cfb8218c8c1ba2cedee68;hb=934c042c9cf09a14762b3fa094f1ba15ec721161;hp=553da6cbb1777a94cb3d6b48dc77c445e18ca2b0;hpb=0d5055665ca1e76659ffa96bf972b4b0125ea069;p=git.git diff --git a/Documentation/git-grep.txt b/Documentation/git-grep.txt index 553da6cbb..8c700200f 100644 --- a/Documentation/git-grep.txt +++ b/Documentation/git-grep.txt @@ -17,6 +17,8 @@ SYNOPSIS [-l | --files-with-matches] [-L | --files-without-match] [-z | --null] [-c | --count] [--all-match] + [--max-depth ] + [--color | --no-color] [-A ] [-B ] [-C ] [-f ] [-e] [--and|--or|--not|(|)|-e ...] [...] @@ -46,6 +48,10 @@ OPTIONS -I:: Don't match the pattern in binary files. +--max-depth :: + For each pathspec given on command line, descend at most + levels of directories. A negative value means no limit. + -w:: --word-regexp:: Match the pattern only at word boundary (either begin at the @@ -105,6 +111,13 @@ OPTIONS Instead of showing every matched line, show the number of lines that match. +--color:: + Show colored matches. + +--no-color:: + Turn off match highlighting, even when the configuration file + gives the default to color output. + -[ABC] :: Show `context` trailing (`A` -- after), or leading (`B` -- before), or both (`C` -- context) lines, and place a @@ -114,6 +127,14 @@ OPTIONS -:: A shortcut for specifying -C. +-p:: +--show-function:: + Show the preceding line that contains the function name of + the match, unless the matching line is a function name itself. + The name is determined in the same way as 'git diff' works out + patch hunk headers (see 'Defining a custom hunk-header' in + linkgit:gitattributes[5]). + -f :: Read patterns from , one per line.