reflog expire: cover reflog from all worktrees
[gitweb.git] / builtin / index-pack.c
index edcb0a3dcaa66335cafd34bf084b17b1d51998fb..2004e25da230c7d9f0b1e951d8a59dca2d9d08b8 100644 (file)
@@ -1166,7 +1166,7 @@ static void parse_pack_objects(unsigned char *hash)
        /* Check pack integrity */
        flush();
        the_hash_algo->final_fn(hash, &input_ctx);
-       if (hashcmp(fill(the_hash_algo->rawsz), hash))
+       if (!hasheq(fill(the_hash_algo->rawsz), hash))
                die(_("pack is corrupted (SHA1 mismatch)"));
        use(the_hash_algo->rawsz);
 
@@ -1280,7 +1280,7 @@ static void conclude_pack(int fix_thin_pack, const char *curr_pack, unsigned cha
                fixup_pack_header_footer(output_fd, pack_hash,
                                         curr_pack, nr_objects,
                                         read_hash, consumed_bytes-the_hash_algo->rawsz);
-               if (hashcmp(read_hash, tail_hash) != 0)
+               if (!hasheq(read_hash, tail_hash))
                        die(_("Unexpected tail checksum for %s "
                              "(disk corruption?)"), curr_pack);
        }