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) {