aboutsummaryrefslogtreecommitdiff
path: root/Documentation
diff options
context:
space:
mode:
authorAndreas Ericsson <ae@op5.se>2006-11-30 12:43:13 +0100
committerJunio C Hamano <junkio@cox.net>2006-12-01 21:57:04 -0800
commit4c81c213a479e4aae0653a56ad6e8db5c31f019c (patch)
treef6e293579bb51afb0d7a755878625f6e967b5159 /Documentation
parentced7b828fadbf3d6de49d75392f1516b4ceb4491 (diff)
downloadgit-4c81c213a479e4aae0653a56ad6e8db5c31f019c.tar.gz
git-4c81c213a479e4aae0653a56ad6e8db5c31f019c.tar.xz
git-diff: Introduce --index and deprecate --cached.
'git diff --cached' still works, but its use is discouraged in the documentation. 'git diff --index' does the same thing and is consistent with how 'git apply --index' works. Signed-off-by: Andreas Ericsson <ae@op5.se> Signed-off-by: Junio C Hamano <junkio@cox.net>
Diffstat (limited to 'Documentation')
-rw-r--r--Documentation/git-diff.txt6
1 files changed, 4 insertions, 2 deletions
diff --git a/Documentation/git-diff.txt b/Documentation/git-diff.txt
index 228c4d95b..3144864d8 100644
--- a/Documentation/git-diff.txt
+++ b/Documentation/git-diff.txt
@@ -22,8 +22,10 @@ the number of trees given to the command.
* When one <tree-ish> is given, the working tree and the named
tree are compared, using `git-diff-index`. The option
- `--cached` can be given to compare the index file and
+ `--index` can be given to compare the index file and
the named tree.
+ `--cached` is a deprecated alias for `--index`. It's use is
+ discouraged.
* When two <tree-ish>s are given, these two trees are compared
using `git-diff-tree`.
@@ -47,7 +49,7 @@ Various ways to check your working tree::
+
------------
$ git diff <1>
-$ git diff --cached <2>
+$ git diff --index <2>
$ git diff HEAD <3>
------------
+