sha1-name.c: remove implicit dependency on the_index
[gitweb.git] / builtin / diff-tree.c
index d07bf2e4c4b5c2ec2f93930c0dd16897df32b25f..42bc1eb41db8287ab9f64445ec2a151f216d8840 100644 (file)
@@ -110,7 +110,7 @@ int cmd_diff_tree(int argc, const char **argv, const char *prefix)
                usage(diff_tree_usage);
 
        git_config(git_diff_basic_config, NULL); /* no "diff" UI options */
-       init_revisions(opt, prefix);
+       repo_init_revisions(the_repository, opt, prefix);
        if (read_cache() < 0)
                die(_("index file corrupt"));
        opt->abbrev = 0;
@@ -165,7 +165,7 @@ int cmd_diff_tree(int argc, const char **argv, const char *prefix)
 
                if (opt->diffopt.detect_rename) {
                        if (!the_index.cache)
-                               read_index(&the_index);
+                               repo_read_index(the_repository);
                        opt->diffopt.setup |= DIFF_SETUP_USE_SIZE_CACHE;
                }
                while (fgets(line, sizeof(line), stdin)) {