unpack-trees: don't shadow global var the_index
[gitweb.git] / shallow.c
index e9ce55bba08489d30a7a4516fc39e332260ac2f7..dbe8a2a2906abf9b393eeca1cdad8c9425c3e4bb 100644 (file)
--- a/shallow.c
+++ b/shallow.c
@@ -96,7 +96,9 @@ struct commit_list *get_shallow_commits(struct object_array *heads, int depth,
                        if (i < heads->nr) {
                                int **depth_slot;
                                commit = (struct commit *)
-                                       deref_tag(heads->objects[i++].item, NULL, 0);
+                                       deref_tag(the_repository,
+                                                 heads->objects[i++].item,
+                                                 NULL, 0);
                                if (!commit || commit->object.type != OBJ_COMMIT) {
                                        commit = NULL;
                                        continue;