Skip to content

Commit

Permalink
Documentation: update implicit "--no-index" behavior in "git diff"
Browse files Browse the repository at this point in the history
Originally "--no-index" mode triggered for untracked files within the
tracked tree, but with v1.5.6-rc1~41 (Merge branch 'jc/diff-no-no-index,
2008-05-26) the command was fixed to only implicitly trigger when paths
outside the tracked tree are mentioned.

Reported-by: Yann Dirson <dirson@bertin.fr>
Signed-off-by: Jonathan Nieder <jrnieder@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
  • Loading branch information
jrn authored and gitster committed Oct 14, 2010
1 parent b77134b commit 2475770
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions Documentation/git-diff.txt
Expand Up @@ -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>...]::

Expand Down

0 comments on commit 2475770

Please sign in to comment.