path: root/Documentation/git-diff-files.txt
diff options
authorJohannes Schindelin <>2007-02-22 20:50:10 (GMT)
committerJunio C Hamano <>2007-02-23 04:59:55 (GMT)
commitd516c2d11945cf13ed3d961fa63817c60b7a566b (patch)
tree7d9aa00054be3a60e6ababc94aa0ccaa573b768f /Documentation/git-diff-files.txt
parentf5a92647694f18fb3544060a1a964ac082d072b2 (diff)
Teach git-diff-files the new option `--no-index`
With this flag and given two paths, git-diff-files behaves as a GNU diff lookalike (plus the git goodies like --check, colour, etc.). This flag is also available in git-diff. It also works outside of a git repository. In addition, if git-diff{,-files} is called without revision or stage parameter, and with exactly two paths at least one of which is not tracked, the default is --no-index. So, you can now say git diff /etc/inittab /etc/fstab and it actually works! This also unifies the duplicated argument parsing between cmd_diff_files() and builtin_diff_files(). Signed-off-by: Johannes Schindelin <> Signed-off-by: Junio C Hamano <>
Diffstat (limited to 'Documentation/git-diff-files.txt')
1 files changed, 4 insertions, 1 deletions
diff --git a/Documentation/git-diff-files.txt b/Documentation/git-diff-files.txt
index 7248b35..b78c4c6 100644
--- a/Documentation/git-diff-files.txt
+++ b/Documentation/git-diff-files.txt
@@ -8,7 +8,7 @@ git-diff-files - Compares files in the working tree and the index
-'git-diff-files' [-q] [-0|-1|-2|-3|-c|--cc] [<common diff options>] [<path>...]
+'git-diff-files' [-q] [-0|-1|-2|-3|-c|--cc|-n|--no-index] [<common diff options>] [<path>...]
@@ -36,6 +36,9 @@ omit diff output for unmerged entries and just show "Unmerged".
diff, similar to the way 'diff-tree' shows a merge
commit with these flags.
+ Compare the two given files / directories.
Remain silent even on nonexistent files