path: root/Documentation/git-diff.txt
diff options
authorDale R. Worley <>2013-08-22 20:31:21 (GMT)
committerJunio C Hamano <>2013-08-22 20:55:28 (GMT)
commitb214eddfb2d57e318a3f5b88da1cafcf19184b4d (patch)
tree35115dffbe71f776bcd0ff904309a09f90c10937 /Documentation/git-diff.txt
parenta3bc3d070cacf07dbe11b4bfec57554c8bbf1957 (diff)
diff --no-index: clarify operation when not inside a repository
Clarify documentation for "diff --no-index". State that when not inside a repository, --no-index is implied and two arguments are mandatory. Clarify error message from diff-no-index to inform user that CWD is not inside a repository and thus two arguments are mandatory. Signed-off-by: Dale Worley <> Signed-off-by: Junio C Hamano <>
Diffstat (limited to 'Documentation/git-diff.txt')
1 files changed, 2 insertions, 1 deletions
diff --git a/Documentation/git-diff.txt b/Documentation/git-diff.txt
index 78d6d50..b1630ba 100644
--- a/Documentation/git-diff.txt
+++ b/Documentation/git-diff.txt
@@ -31,7 +31,8 @@ two blob objects, or changes between two files on disk.
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.
+directories. This behavior can be forced by --no-index or by
+executing 'git diff' outside of a working tree.
'git diff' [--options] --cached [<commit>] [--] [<path>...]::