submodule: add repo_read_gitmodules
[gitweb.git] / builtin / unpack-objects.c
index 7d5efa2b3b5a7b83c7765765e360757d6f7d282a..193f8b9d57f0759c38004fd1d99f660919ac30e3 100644 (file)
@@ -1,5 +1,6 @@
 #include "builtin.h"
 #include "cache.h"
+#include "config.h"
 #include "object.h"
 #include "delta.h"
 #include "pack.h"
@@ -260,7 +261,8 @@ static void write_object(unsigned nr, enum object_type type,
                int eaten;
                hash_sha1_file(buf, size, typename(type), obj_list[nr].oid.hash);
                added_object(nr, type, buf, size);
-               obj = parse_object_buffer(obj_list[nr].oid.hash, type, size, buf, &eaten);
+               obj = parse_object_buffer(&obj_list[nr].oid, type, size, buf,
+                                         &eaten);
                if (!obj)
                        die("invalid %s", typename(type));
                add_object_buffer(obj, buf, size);