aboutsummaryrefslogtreecommitdiffstats
path: root/Documentation/git-grep.txt
diff options
context:
space:
mode:
authorPhilippe Blain <levraiphilippeblain@gmail.com>2020-11-01 17:28:43 +0000
committerJunio C Hamano <gitster@pobox.com>2020-11-01 15:54:14 -0800
commit0cce88f1e4b0ccbdc804db8b522aeb11b0f2b199 (patch)
tree6970a2c8908dbb743639805ca19024763ba07795 /Documentation/git-grep.txt
parenta4514a46d9c85278ae4a350442dd4a160ff1f3cf (diff)
downloadgit-0cce88f1e4b0ccbdc804db8b522aeb11b0f2b199.tar.gz
doc: add more pointers to gitattributes(5) for userdiff
Several Git commands can make use of the builtin userdiff patterns, but it's not obvious in the documentation. Add pointers to the 'Defining a custom hunk header' part of gitattributes(5) in the description of the following options: - the '--function-context' option of `git diff` and friends - the '--function-context' option of `git grep` - the '-L :<funcname>' option of `git log`, `gitk` and `git blame` In 'git-grep.txt', take the opportunity to use backticks in the description of '--show-function', and improve the wording of the desription of '--function-context'. Signed-off-by: Philippe Blain <levraiphilippeblain@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'Documentation/git-grep.txt')
-rw-r--r--Documentation/git-grep.txt6
1 files changed, 4 insertions, 2 deletions
diff --git a/Documentation/git-grep.txt b/Documentation/git-grep.txt
index 6077ff01a4..4e0ba8234a 100644
--- a/Documentation/git-grep.txt
+++ b/Documentation/git-grep.txt
@@ -241,7 +241,7 @@ providing this option will cause it to die.
--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
+ 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]).
@@ -266,7 +266,9 @@ providing this option will cause it to die.
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.
+ found. The function names are determined in the same way as
+ `git diff` works out patch hunk headers (see 'Defining a
+ custom hunk-header' in linkgit:gitattributes[5]).
--threads <num>::
Number of grep worker threads to use.