Merge branch 'nd/command-list'
[gitweb.git] / commit-graph.c
index 70fa1b25fd3d07a935cc0e7ba4cf70bc24ca3d21..4c6127088ff96282fbcdc98ef5767281e52846e9 100644 (file)
@@ -9,6 +9,7 @@
 #include "revision.h"
 #include "sha1-lookup.h"
 #include "commit-graph.h"
+#include "object-store.h"
 
 #define GRAPH_SIGNATURE 0x43475048 /* "CGPH" */
 #define GRAPH_CHUNKID_OIDFANOUT 0x4f494446 /* "OIDF" */
@@ -206,8 +207,10 @@ static void prepare_commit_graph(void)
 
        obj_dir = get_object_directory();
        prepare_commit_graph_one(obj_dir);
-       prepare_alt_odb();
-       for (alt = alt_odb_list; !commit_graph && alt; alt = alt->next)
+       prepare_alt_odb(the_repository);
+       for (alt = the_repository->objects->alt_odb_list;
+            !commit_graph && alt;
+            alt = alt->next)
                prepare_commit_graph_one(alt->path);
 }
 
@@ -512,7 +515,7 @@ static int add_packed_commits(const struct object_id *oid,
        struct object_info oi = OBJECT_INFO_INIT;
 
        oi.typep = &type;
-       if (packed_object_info(pack, offset, &oi) < 0)
+       if (packed_object_info(the_repository, pack, offset, &oi) < 0)
                die("unable to get type of object %s", oid_to_hex(oid));
 
        if (type != OBJ_COMMIT)