X-Git-Url: http://git.ipfire.org/?a=blobdiff_plain;f=pack-write.c;h=29d17a9bec279eed01a27f7089de1992dfc1dc4f;hb=ddc56d4710fa004c922349407f3de0c3adf90ac9;hp=a9d46bc03f63b27ff85cceecb763d4e39f47898f;hpb=a51c63809e67a40767313df3bb1ca3e88053ff1f;p=thirdparty%2Fgit.git diff --git a/pack-write.c b/pack-write.c index a9d46bc03f..29d17a9bec 100644 --- a/pack-write.c +++ b/pack-write.c @@ -124,7 +124,7 @@ const char *write_idx_file(const char *index_name, struct pack_idx_entry **objec } hashwrite(f, obj->oid.hash, the_hash_algo->rawsz); if ((opts->flags & WRITE_IDX_STRICT) && - (i && !oidcmp(&list[-2]->oid, &obj->oid))) + (i && oideq(&list[-2]->oid, &obj->oid))) die("The same object %s appears twice in the pack", oid_to_hex(&obj->oid)); } @@ -260,7 +260,7 @@ void fixup_pack_header_footer(int pack_fd, if (partial_pack_offset == 0) { unsigned char hash[GIT_MAX_RAWSZ]; the_hash_algo->final_fn(hash, &old_hash_ctx); - if (hashcmp(hash, partial_pack_hash) != 0) + if (!hasheq(hash, partial_pack_hash)) die("Unexpected checksum for %s " "(disk corruption?)", pack_name); /*