preload-index.c: use the right index instead of the_index
[gitweb.git] / resolve-undo.c
index fc5b3b83d9a08e9deed55ee15520387f147da626..d2e2d22b7fb6a087eced2320fbd766bfc8ea1efc 100644 (file)
@@ -146,7 +146,9 @@ int unmerge_index_entry_at(struct index_state *istate, int pos)
                struct cache_entry *nce;
                if (!ru->mode[i])
                        continue;
-               nce = make_cache_entry(ru->mode[i], ru->oid[i].hash,
+               nce = make_cache_entry(istate,
+                                      ru->mode[i],
+                                      &ru->oid[i],
                                       name, i + 1, 0);
                if (matched)
                        nce->ce_flags |= CE_MATCHED;
@@ -186,7 +188,7 @@ void unmerge_index(struct index_state *istate, const struct pathspec *pathspec)
 
        for (i = 0; i < istate->cache_nr; i++) {
                const struct cache_entry *ce = istate->cache[i];
-               if (!ce_path_match(ce, pathspec, NULL))
+               if (!ce_path_match(&the_index, ce, pathspec, NULL))
                        continue;
                i = unmerge_index_entry_at(istate, i);
        }