ls-files: use repository object
[gitweb.git] / builtin / index-pack.c
index 2241ee68ed0805942e98ef59bbd85c64651603ec..edc1a91d89b308b1e164c48c1dfb06c8f6ebf0d1 100644 (file)
@@ -1,4 +1,5 @@
 #include "builtin.h"
+#include "config.h"
 #include "delta.h"
 #include "pack.h"
 #include "csum-file.h"
@@ -829,7 +830,7 @@ static void sha1_object(const void *data, struct object_entry *obj_entry,
        if (strict) {
                read_lock();
                if (type == OBJ_BLOB) {
-                       struct blob *blob = lookup_blob(oid->hash);
+                       struct blob *blob = lookup_blob(oid);
                        if (blob)
                                blob->object.flags |= FLAG_CHECKED;
                        else
@@ -845,7 +846,8 @@ static void sha1_object(const void *data, struct object_entry *obj_entry,
                         * we do not need to free the memory here, as the
                         * buf is deleted by the caller.
                         */
-                       obj = parse_object_buffer(oid->hash, type, size, buf, &eaten);
+                       obj = parse_object_buffer(oid, type, size, buf,
+                                                 &eaten);
                        if (!obj)
                                die(_("invalid %s"), typename(type));
                        if (do_fsck_object &&