summaryrefslogtreecommitdiff
path: root/Documentation/git-diff.txt
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2010-10-13 20:20:09 -0700
committerJunio C Hamano <gitster@pobox.com>2010-10-13 20:20:09 -0700
commit38a18873b21f6f2eebedc65aff2249fd6ec2168c (patch)
tree5f7d8cce901a2317a8fbdef7bce2fb85742be1fc /Documentation/git-diff.txt
parent2794ad524462c4e2ecd4573d650e7b4f8da89a5d (diff)
parent352953a556e7f8d720e26a32d4aabbf823d3c4d4 (diff)
downloadgit-38a18873b21f6f2eebedc65aff2249fd6ec2168c.tar.gz
Merge branch 'maint'
* maint: Better advice on using topic branches for kernel development Documentation: update implicit "--no-index" behavior in "git diff" Documentation: expand 'git diff' SEE ALSO section Documentation: diff can compare blobs Documentation: gitrevisions is in section 7 shell portability: no "export VAR=VAL" CodingGuidelines: reword parameter expansion section Documentation: update-index: -z applies also to --index-info Documentation: No argument of ALLOC_GROW should have side-effects
Diffstat (limited to 'Documentation/git-diff.txt')
-rw-r--r--Documentation/git-diff.txt23
1 files changed, 14 insertions, 9 deletions
diff --git a/Documentation/git-diff.txt b/Documentation/git-diff.txt
index 08fd4099ad..dd1fb32786 100644
--- a/Documentation/git-diff.txt
+++ b/Documentation/git-diff.txt
@@ -23,9 +23,9 @@ tree and the index file, or the index file and the working tree.
further add to the index but you still haven't. You can
stage these changes by using linkgit:git-add[1].
+
-If exactly two paths are given, and at least one is untracked,
-compare the two files / directories. This behavior can be
-forced by --no-index.
+If exactly two paths are given and at least one points outside
+the current repository, 'git diff' will compare the two files /
+directories. This behavior can be forced by --no-index.
'git diff' [--options] --cached [<commit>] [--] [<path>...]::
@@ -64,15 +64,16 @@ forced by --no-index.
Just in case if you are doing something exotic, it should be
noted that all of the <commit> in the above description, except
-for the last two forms that use ".." notations, can be any
-<tree-ish>.
+in the last two forms that use ".." notations, can be any
+<tree>. The third form ('git diff <commit> <commit>') can also
+be used to compare two <blob> objects.
For a more complete list of ways to spell <commit>, see
-"SPECIFYING REVISIONS" section in linkgit:gitrevisions[1].
+"SPECIFYING REVISIONS" section in linkgit:gitrevisions[7].
However, "diff" is about comparing two _endpoints_, not ranges,
and the range notations ("<commit>..<commit>" and
"<commit>\...<commit>") do not mean a range as defined in the
-"SPECIFYING RANGES" section in linkgit:gitrevisions[1].
+"SPECIFYING RANGES" section in linkgit:gitrevisions[7].
OPTIONS
-------
@@ -159,8 +160,12 @@ rewrites (very expensive).
SEE ALSO
--------
-linkgit:git-difftool[1]::
- Show changes using common diff tools
+diff(1),
+linkgit:git-difftool[1],
+linkgit:git-log[1],
+linkgit:gitdiffcore[7],
+linkgit:git-format-patch[1],
+linkgit:git-apply[1]
Author
------