Skip to content

Commit 2475770

Browse files
jrngitster
authored andcommitted
Documentation: update implicit "--no-index" behavior in "git diff"
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 <[email protected]> Signed-off-by: Jonathan Nieder <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent b77134b commit 2475770

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

Documentation/git-diff.txt

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -23,9 +23,9 @@ tree and the index file, or the index file and the working tree.
2323
further add to the index but you still haven't. You can
2424
stage these changes by using linkgit:git-add[1].
2525
+
26-
If exactly two paths are given, and at least one is untracked,
27-
compare the two files / directories. This behavior can be
28-
forced by --no-index.
26+
If exactly two paths are given and at least one points outside
27+
the current repository, 'git diff' will compare the two files /
28+
directories. This behavior can be forced by --no-index.
2929

3030
'git diff' [--options] --cached [<commit>] [--] [<path>...]::
3131

0 commit comments

Comments
 (0)