Git 2.23
[gitweb.git] / builtin / unpack-objects.c
index ad438f5b41abf9ec82474b5e06dae7254b2068b7..a87a4bfd2c557755cc0c49d28cf8597449e4d0b1 100644 (file)
@@ -332,7 +332,7 @@ static int resolve_against_held(unsigned nr, const struct object_id *base,
 {
        struct object *obj;
        struct obj_buffer *obj_buffer;
-       obj = lookup_object(the_repository, base->hash);
+       obj = lookup_object(the_repository, base);
        if (!obj)
                return 0;
        obj_buffer = lookup_object_buffer(obj);
@@ -579,7 +579,7 @@ int cmd_unpack_objects(int argc, const char **argv, const char *prefix)
                if (fsck_finish(&fsck_options))
                        die(_("fsck error in pack objects"));
        }
-       if (hashcmp(fill(the_hash_algo->rawsz), oid.hash))
+       if (!hasheq(fill(the_hash_algo->rawsz), oid.hash))
                die("final sha1 did not match");
        use(the_hash_algo->rawsz);