aboutsummaryrefslogtreecommitdiffstats
path: root/packfile.c
diff options
context:
space:
mode:
authorJeff King <peff@peff.net>2018-08-28 17:22:52 -0400
committerJunio C Hamano <gitster@pobox.com>2018-08-29 11:32:49 -0700
commit67947c34ae8f666e72b9406a38984fe8386f5e50 (patch)
treec9ae21d6995cf9011777cb9d336bfa14f4587fc5 /packfile.c
parentconvert "oidcmp() != 0" to "!oideq()" (diff)
downloadgit-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 'packfile.c')
-rw-r--r--packfile.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/packfile.c b/packfile.c
index c2e96293adf..1e9eacd9b34 100644
--- a/packfile.c
+++ b/packfile.c
@@ -517,7 +517,7 @@ static int open_packed_git_1(struct packed_git *p)
if (read_result != hashsz)
return error("packfile %s signature is unavailable", p->pack_name);
idx_hash = ((unsigned char *)p->index_data) + p->index_size - hashsz * 2;
- if (hashcmp(hash, idx_hash))
+ if (!hasheq(hash, idx_hash))
return error("packfile %s does not match index", p->pack_name);
return 0;
}