diff options
author | Jeff King <peff@peff.net> | 2018-08-28 23:22:52 +0200 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2018-08-29 20:32:49 +0200 |
commit | 67947c34ae8f666e72b9406a38984fe8386f5e50 (patch) | |
tree | c9ae21d6995cf9011777cb9d336bfa14f4587fc5 /pack-write.c | |
parent | convert "oidcmp() != 0" to "!oideq()" (diff) | |
download | git-67947c34ae8f666e72b9406a38984fe8386f5e50.tar.xz git-67947c34ae8f666e72b9406a38984fe8386f5e50.zip |
convert "hashcmp() != 0" to "!hasheq()"
This rounds out the previous three patches, covering the
inequality logic for the "hash" variant of the functions.
As with the previous three, the accompanying code changes
are the mechanical result of applying the coccinelle patch;
see those patches for more discussion.
Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'pack-write.c')
-rw-r--r-- | pack-write.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/pack-write.c b/pack-write.c index 7d14716c40..29d17a9bec 100644 --- a/pack-write.c +++ b/pack-write.c @@ -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); /* |