Merge branch 'tb/config-default'
[gitweb.git] / commit-graph.c
index bb54c1214c84c66b173d236b2851a47a517dab30..b63a1fc85eaded844fcb1a2634067f9509b5937c 100644 (file)
@@ -10,6 +10,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" */
@@ -207,8 +208,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);
 }
 
@@ -533,7 +536,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)