Andrew's git
/
gitweb.git
/ blobdiff
summary
|
log
|
commit
|
diff
|
tree
commit
grep
author
committer
pickaxe
?
re
Add `init.templatedir` configuration variable.
[gitweb.git]
/
builtin-diff-index.c
diff --git
a/builtin-diff-index.c
b/builtin-diff-index.c
index 17d851b29ee5de33e01745eabcd5cd735c30b352..04837494feba401c7f689eab5574768d3fd126de 100644
(file)
--- a/
builtin-diff-index.c
+++ b/
builtin-diff-index.c
@@
-39,6
+39,8
@@
int cmd_diff_index(int argc, const char **argv, const char *prefix)
if (rev.pending.nr != 1 ||
rev.max_count != -1 || rev.min_age != -1 || rev.max_age != -1)
usage(diff_cache_usage);
+ if (!cached)
+ setup_work_tree();
if (read_cache() < 0) {
perror("read_cache");
return -1;