summaryrefslogtreecommitdiff
path: root/Documentation/diff-options.txt
diff options
context:
space:
mode:
authorLibravatar Philippe Blain <levraiphilippeblain@gmail.com>2020-11-01 17:28:43 +0000
committerLibravatar Junio C Hamano <gitster@pobox.com>2020-11-01 15:54:14 -0800
commit0cce88f1e4b0ccbdc804db8b522aeb11b0f2b199 (patch)
tree6970a2c8908dbb743639805ca19024763ba07795 /Documentation/diff-options.txt
parentblame-options.txt: also mention 'funcname' in '-L' description (diff)
downloadtgif-0cce88f1e4b0ccbdc804db8b522aeb11b0f2b199.tar.xz
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/diff-options.txt')
-rw-r--r--Documentation/diff-options.txt5
1 files changed, 4 insertions, 1 deletions
diff --git a/Documentation/diff-options.txt b/Documentation/diff-options.txt
index 573fb9bb71..72b558ce21 100644
--- a/Documentation/diff-options.txt
+++ b/Documentation/diff-options.txt
@@ -695,7 +695,10 @@ endif::git-format-patch[]
-W::
--function-context::
- Show whole surrounding functions of changes.
+ Show whole function as context lines for each change.
+ 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]).
ifndef::git-format-patch[]
ifndef::git-log[]