summaryrefslogtreecommitdiff
path: root/builtin-diff.c
diff options
context:
space:
mode:
Diffstat (limited to 'builtin-diff.c')
-rw-r--r--builtin-diff.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/builtin-diff.c b/builtin-diff.c
index a659020..1c535b1 100644
--- a/builtin-diff.c
+++ b/builtin-diff.c
@@ -137,7 +137,7 @@ static int builtin_diff_index(struct rev_info *revs,
int cached = 0;
while (1 < argc) {
const char *arg = argv[1];
- if (!strcmp(arg, "--cached"))
+ if (!strcmp(arg, "--index") || !strcmp(arg, "--cached"))
cached = 1;
else
usage(builtin_diff_usage);