X-Git-Url: https://git.verplant.org/?a=blobdiff_plain;f=Documentation%2Fdiff-format.txt;h=6e9fa8cdb70faead4649f71aea4fff8f50d17271;hb=deca7e8c591608c9ffd0bf0aaf10b379da9f6d6e;hp=811d143808a13034de41c1cdcc834ef838d01ce8;hpb=8db9307c9ca143fedaa972236054a5783c40bd37;p=git.git diff --git a/Documentation/diff-format.txt b/Documentation/diff-format.txt index 811d1438..6e9fa8cd 100644 --- a/Documentation/diff-format.txt +++ b/Documentation/diff-format.txt @@ -1,13 +1,13 @@ -The output format from "git-diff-cache", "git-diff-tree" and +The output format from "git-diff-index", "git-diff-tree" and "git-diff-files" are very similar. These commands all compare two sets of things; what are compared are different: -git-diff-cache :: +git-diff-index :: compares the and the files on the filesystem. -git-diff-cache --cached :: +git-diff-index --cached :: compares the and the cache. git-diff-tree [-r] [...]:: @@ -58,12 +58,11 @@ Example: Generating patches with -p -------------------------- -When "git-diff-cache", "git-diff-tree", or "git-diff-files" are run +When "git-diff-index", "git-diff-tree", or "git-diff-files" are run with a '-p' option, they do not produce the output described above; instead they produce a patch file. -The patch generation can be customized at two levels. This -customization also applies to "git-diff-helper". +The patch generation can be customized at two levels. 1. When the environment variable 'GIT_EXTERNAL_DIFF' is not set, these commands internally invoke "diff" like this: @@ -77,7 +76,7 @@ The "diff" formatting options can be customized via the environment variable 'GIT_DIFF_OPTS'. For example, if you prefer context diff: - GIT_DIFF_OPTS=-c git-diff-cache -p $(cat .git/HEAD) + GIT_DIFF_OPTS=-c git-diff-index -p $(cat .git/HEAD) 2. When the environment variable 'GIT_EXTERNAL_DIFF' is set, the