summaryrefslogtreecommitdiff
path: root/Documentation/git-diff.txt
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2013-08-28 22:17:18 (GMT)
committerJunio C Hamano <gitster@pobox.com>2013-08-28 22:17:18 (GMT)
commit286bc123cdabed76a1da25a32e97d392b37d51a2 (patch)
tree8a2e0b5ac593780ed6c5555f93eeb692304271d6 /Documentation/git-diff.txt
parentb214eddfb2d57e318a3f5b88da1cafcf19184b4d (diff)
downloadgit-286bc123cdabed76a1da25a32e97d392b37d51a2.zip
git-286bc123cdabed76a1da25a32e97d392b37d51a2.tar.gz
git-286bc123cdabed76a1da25a32e97d392b37d51a2.tar.bz2
diff --no-index: describe in a separate paragraph
The documentation for "diff-files" mode of "git diff" primarily talks about how changes in the files in the working tree are shown relative to the contents previously added to that index, and tucks explanation on how "--no-index" mode, which works in a quite different way, may be implicitly used instead. Instead, add a separate paragraph to explain what "--no-index" mode does, and also mention when "--no-index" can be omitted from the command line (essentially, when it is obvious from the context). Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'Documentation/git-diff.txt')
-rw-r--r--Documentation/git-diff.txt14
1 files changed, 9 insertions, 5 deletions
diff --git a/Documentation/git-diff.txt b/Documentation/git-diff.txt
index b1630ba..33fbd8c 100644
--- a/Documentation/git-diff.txt
+++ b/Documentation/git-diff.txt
@@ -28,11 +28,15 @@ two blob objects, or changes between two files on disk.
words, the differences are what you _could_ tell Git to
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 points outside
-the current repository, 'git diff' will compare the two files /
-directories. This behavior can be forced by --no-index or by
-executing 'git diff' outside of a working tree.
+
+'git diff' --no-index [--options] [--] [<path>...]::
+
+ This form is to compare the given two paths on the
+ filesystem. You can omit the `--no-index` option when
+ running the command in a working tree controlled by Git and
+ at least one of the paths points outside the working tree,
+ or when running the command outside a working tree
+ controlled by Git.
'git diff' [--options] --cached [<commit>] [--] [<path>...]::