summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 136e631)
raw | patch | inline | side by side (parent: 136e631)
author | Gerrit Pape <pape@smarden.org> | |
Wed, 31 Oct 2007 13:59:16 +0000 (13:59 +0000) | ||
committer | Junio C Hamano <gitster@pobox.com> | |
Fri, 2 Nov 2007 00:07:22 +0000 (17:07 -0700) |
git-diff.txt includes diff-options.txt which for the -p option refers
to a section "generating patches.." which is missing from the git-diff
documentation. This patch adapts diff-format.txt to additionally
mention the git-diff program, and includes diff-format.txt into
git-diff.txt.
Tino Keitel noticed this problem.
Signed-off-by: Gerrit Pape <pape@smarden.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
to a section "generating patches.." which is missing from the git-diff
documentation. This patch adapts diff-format.txt to additionally
mention the git-diff program, and includes diff-format.txt into
git-diff.txt.
Tino Keitel noticed this problem.
Signed-off-by: Gerrit Pape <pape@smarden.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Documentation/diff-format.txt | patch | blob | history | |
Documentation/git-diff.txt | patch | blob | history |
index 001503205b24d5c20ec10792c4ab6c4c7221bcb7..9709c35c98bc678d1f2e339c8e2d4bbcd7e6231f 100644 (file)
-The output format from "git-diff-index", "git-diff-tree" and
-"git-diff-files" are very similar.
+The output format from "git-diff-index", "git-diff-tree",
+"git-diff-files" and "git diff --raw" are very similar.
These commands all compare two sets of things; what is
compared differs:
diff format for merges
----------------------
-"git-diff-tree" and "git-diff-files" can take '-c' or '--cc' option
+"git-diff-tree", "git-diff-files" and "git-diff --raw"
+can take '-c' or '--cc' option
to generate diff output also for merge commits. The output differs
from the format described above in the following way:
--------------------------
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. You can customize the creation
-of such patches via the GIT_EXTERNAL_DIFF and the GIT_DIFF_OPTS
-environment variables.
+with a '-p' option, or "git diff" without the '--raw' option, they
+do not produce the output described above; instead they produce a
+patch file. You can customize the creation of such patches via the
+GIT_EXTERNAL_DIFF and the GIT_DIFF_OPTS environment variables.
What the -p option produces is slightly different from the traditional
diff format.
combined diff format
--------------------
-git-diff-tree and git-diff-files can take '-c' or '--cc' option
-to produce 'combined diff', which looks like this:
+"git-diff-tree", "git-diff-files" and "git-diff" can take '-c' or
+'--cc' option to produce 'combined diff', which looks like this:
------------
diff --combined describe.c
index db2eb46a191ecafac09492b95ec6f3a3233dbc6e..201d5daf1a98e510bbf838ab2a66c07bae88f991 100644 (file)
the diff to the named paths (you can give directory
names and get diff for all files under them).
+Output format
+-------------
+include::diff-format.txt[]
EXAMPLES
--------