read-cache: use oideq() in ce_compare functions
commit6a29d7b7a72c7b131ae3cda9e0b47b67a27a51f1
authorJeff King <peff@peff.net>
Tue, 28 Aug 2018 21:22:59 +0000 (28 17:22 -0400)
committerJunio C Hamano <gitster@pobox.com>
Wed, 29 Aug 2018 18:32:49 +0000 (29 11:32 -0700)
tree6c1bb588fa181665d031b96f4b3a0488538bc6b2
parentcc00e5ce6b50cf4197e137b87a33209568b1e662
read-cache: use oideq() in ce_compare functions

These functions return the full oidcmp() value, but the
callers really only care whether it is non-zero. We can use
the more strict !oideq(), which a compiler may be able to
optimize further.

This does change the meaning of the return value subtly, but
it's unlikely that anybody would try to use them for
ordering. They're static-local in this file, and they
already return other error values that would confuse an
ordering (e.g., open() failure gives -1).

Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
read-cache.c