X-Git-Url: https://git.verplant.org/?a=blobdiff_plain;f=Documentation%2Fdiff-format.txt;h=0398b408c05d2dccb9806c0add6d1acd13871d74;hb=50b4e0c178777a27164eb67676593255a9cbd035;hp=d1d0d2d3dc8760a8030313de3dd14a942d0fc2bf;hpb=d88156e943ab4ab5990fb8929fc432f7638df7f6;p=git.git diff --git a/Documentation/diff-format.txt b/Documentation/diff-format.txt index d1d0d2d3..0398b408 100644 --- a/Documentation/diff-format.txt +++ b/Documentation/diff-format.txt @@ -8,13 +8,13 @@ git-diff-index :: compares the and the files on the filesystem. git-diff-index --cached :: - compares the and the cache. + compares the and the index. git-diff-tree [-r] [...]:: compares the trees named by the two arguments. git-diff-files [...]:: - compares the cache and the files on the filesystem. + compares the index and the files on the filesystem. An output line is formatted this way: @@ -47,7 +47,7 @@ That is, from the left to the right: . an LF or a NUL when '-z' option is used, to terminate the record. is shown as all 0's if a file is new on the filesystem -and it is out of sync with the cache. +and it is out of sync with the index. Example: @@ -81,7 +81,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-index -p $(cat .git/HEAD) + GIT_DIFF_OPTS=-c git-diff-index -p HEAD 2. When the environment variable 'GIT_EXTERNAL_DIFF' is set, the @@ -104,7 +104,7 @@ where: The file parameters can point at the user's working file (e.g. `new-file` in "git-diff-files"), `/dev/null` (e.g. `old-file` when a new file is added), or a temporary file (e.g. `old-file` in the -cache). 'GIT_EXTERNAL_DIFF' should not worry about unlinking the +index). 'GIT_EXTERNAL_DIFF' should not worry about unlinking the temporary file --- it is removed when 'GIT_EXTERNAL_DIFF' exits. For a path that is unmerged, 'GIT_EXTERNAL_DIFF' is called with 1 @@ -117,7 +117,7 @@ git specific extension to diff format What -p option produces is slightly different from the traditional diff format. -1. It is preceeded with a "git diff" header, that looks like +1. It is preceded with a "git diff" header, that looks like this: diff --git a/file1 b/file2