read-cache.c: kill read_index()
[git/git.git] / sha1-name.c
index b245028..a0fc100 100644 (file)
@@ -1723,9 +1723,9 @@ static int get_oid_with_context_1(const char *name,
                if (flags & GET_OID_RECORD_PATH)
                        oc->path = xstrdup(cp);
 
                if (flags & GET_OID_RECORD_PATH)
                        oc->path = xstrdup(cp);
 
-               if (!active_cache)
-                       read_cache();
-               pos = cache_name_pos(cp, namelen);
+               if (!the_index.cache)
+                       repo_read_index(the_repository);
+               pos = index_name_pos(&the_index, cp, namelen);
                if (pos < 0)
                        pos = -pos - 1;
                while (pos < active_nr) {
                if (pos < 0)
                        pos = -pos - 1;
                while (pos < active_nr) {