Merge branch 'ks/submodule-doc-updates' into maint
[gitweb.git] / builtin / diff-tree.c
index d66499909e82e255a8d1356b606f9b901935317f..b775a756470ddc365907fae53dcc949bcaae7ca5 100644 (file)
@@ -110,6 +110,8 @@ int cmd_diff_tree(int argc, const char **argv, const char *prefix)
 
        git_config(git_diff_basic_config, NULL); /* no "diff" UI options */
        init_revisions(opt, prefix);
+       if (read_cache() < 0)
+               die(_("index file corrupt"));
        opt->abbrev = 0;
        opt->diff = 1;
        opt->disable_stdin = 1;