@matheusbsbs / matheus-bagliano / commits / 17bae89476
Fork 0

git.txt: correct stale 'GIT_EXTERNAL_DIFF' description

In fde97d8ac6 (Update documentation to remove incorrect GIT_DIFF_OPTS example., 2006-11-27), the description of the 'GIT_EXTERNAL_DIFF' variable was moved from 'diff-format.txt' to 'git.txt', and the documentation was updated to remove a 'diff(1)' invocation since Git did not use an external diff program anymore by default. However, the description of 'GIT_EXTERNAL_DIFF' still mentions "instead of the diff invocation described above", which is confusing. Correct that outdated sentence. Also, link to git(1) in 'diff-generate-patch.txt' when GIT_DIFF_OPTS and GIT_EXTERNAL_DIFF are mentioned, so that users can easily know what these variables are about. Signed-off-by: Philippe Blain <levraiphilippeblain@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>

Philippe Blain committed Sep 1, 2020 at 13:20 UTC 17bae894760b79b7e5a4225e0ffca256d3cc5704
2 files changed +5 -3
Documentation/diff-generate-patch.txt
+2 -1
@@ -10,7 +10,8 @@ linkgit:git-diff-tree[1], or
10 linkgit:git-diff-files[1]
11 with the `-p` option produces patch text.
12 You can customize the creation of patch text via the
13 -`GIT_EXTERNAL_DIFF` and the `GIT_DIFF_OPTS` environment variables.
13 +`GIT_EXTERNAL_DIFF` and the `GIT_DIFF_OPTS` environment variables
14 +(see linkgit:git[1]).
15
16 What the -p option produces is slightly different from the traditional
17 diff format:
Documentation/git.txt
+3 -2
@@ -543,8 +543,9 @@ Git Diffs
543
544 `GIT_EXTERNAL_DIFF`::
545 When the environment variable `GIT_EXTERNAL_DIFF` is set, the
546 - program named by it is called, instead of the diff invocation
547 - described above. For a path that is added, removed, or modified,
546 + program named by it is called to generate diffs, and Git
547 + does not use its builtin diff machinery.
548 + For a path that is added, removed, or modified,
549 `GIT_EXTERNAL_DIFF` is called with 7 parameters:
550
551 path old-file old-hex old-mode new-file new-hex new-mode