revision.c: remove implicit dependency on the_index
[gitweb.git] / builtin / replace.c
index 4f05791f3e895f78ba511dd6571bd09abab9269c..e0b16ad44b498dd0b8a6fed68eb7d5093f9b696f 100644 (file)
@@ -295,7 +295,7 @@ static int import_object(struct object_id *oid, enum object_type type,
                        close(fd);
                        return -1;
                }
-               if (index_fd(oid, fd, &st, type, NULL, flags) < 0)
+               if (index_fd(&the_index, oid, fd, &st, type, NULL, flags) < 0)
                        return error(_("unable to write object to database"));
                /* index_fd close()s fd for us */
        }