diff options
author | Jeff King <peff@peff.net> | 2018-10-02 23:19:21 +0200 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2018-10-04 12:42:48 +0200 |
commit | e43d2dcce1db256e95b90f89e06d62834a1d361c (patch) | |
tree | 72b717680d6b340c71a970c29e7996d0e5b1ec35 /cache-tree.c | |
parent | Second batch post 2.19 (diff) | |
download | git-e43d2dcce1db256e95b90f89e06d62834a1d361c.tar.xz git-e43d2dcce1db256e95b90f89e06d62834a1d361c.zip |
more oideq/hasheq conversions
We added faster equality-comparison functions for hashes in
14438c4497 (introduce hasheq() and oideq(), 2018-08-28). A
few topics were in-flight at the time, and can now be
converted. This covers all spots found by "make coccicheck"
in master (the coccicheck results were tweaked by hand for
style).
Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'cache-tree.c')
-rw-r--r-- | cache-tree.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/cache-tree.c b/cache-tree.c index 5ce51468f0..9c5cf2cc4f 100644 --- a/cache-tree.c +++ b/cache-tree.c @@ -781,7 +781,7 @@ static void verify_one(struct index_state *istate, strbuf_add(&tree_buf, oid->hash, the_hash_algo->rawsz); } hash_object_file(tree_buf.buf, tree_buf.len, tree_type, &new_oid); - if (oidcmp(&new_oid, &it->oid)) + if (!oideq(&new_oid, &it->oid)) BUG("cache-tree for path %.*s does not match. " "Expected %s got %s", len, path->buf, oid_to_hex(&new_oid), oid_to_hex(&it->oid)); |