sha1-name.c: remove implicit dependency on the_index
[gitweb.git] / builtin / describe.c
index c48c34e8667c36a42101fffe51bd96f1a4d36842..bc97e50650a39e03448c1c4e5dd0e8f880b9befc 100644 (file)
@@ -629,12 +629,12 @@ int cmd_describe(int argc, const char **argv, const char *prefix)
                        struct argv_array args = ARGV_ARRAY_INIT;
                        int fd, result;
 
-                       read_cache_preload(NULL);
+                       read_cache();
                        refresh_index(&the_index, REFRESH_QUIET|REFRESH_UNMERGED,
                                      NULL, NULL, NULL);
                        fd = hold_locked_index(&index_lock, 0);
                        if (0 <= fd)
-                               update_index_if_able(&the_index, &index_lock);
+                               repo_update_index_if_able(the_repository, &index_lock);
 
                        repo_init_revisions(the_repository, &revs, prefix);
                        argv_array_pushv(&args, diff_index_args);