diff options
author | Jeff King <peff@peff.net> | 2018-08-28 21:22:52 (GMT) |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2018-08-29 18:32:49 (GMT) |
commit | 67947c34ae8f666e72b9406a38984fe8386f5e50 (patch) | |
tree | c9ae21d6995cf9011777cb9d336bfa14f4587fc5 /builtin/unpack-objects.c | |
parent | 9001dc2a7493f1366a183c3a9175f608769321d5 (diff) | |
download | git-67947c34ae8f666e72b9406a38984fe8386f5e50.zip git-67947c34ae8f666e72b9406a38984fe8386f5e50.tar.gz git-67947c34ae8f666e72b9406a38984fe8386f5e50.tar.bz2 |
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 'builtin/unpack-objects.c')
-rw-r--r-- | builtin/unpack-objects.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/builtin/unpack-objects.c b/builtin/unpack-objects.c index ad438f5..8047880 100644 --- a/builtin/unpack-objects.c +++ b/builtin/unpack-objects.c @@ -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); |