summaryrefslogtreecommitdiffstats
path: root/contrib
diff options
context:
space:
mode:
authorJeff King <peff@peff.net>2018-08-28 23:22:52 +0200
committerJunio C Hamano <gitster@pobox.com>2018-08-29 20:32:49 +0200
commit67947c34ae8f666e72b9406a38984fe8386f5e50 (patch)
treec9ae21d6995cf9011777cb9d336bfa14f4587fc5 /contrib
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 'contrib')
-rw-r--r--contrib/coccinelle/object_id.cocci9
1 files changed, 9 insertions, 0 deletions
diff --git a/contrib/coccinelle/object_id.cocci b/contrib/coccinelle/object_id.cocci
index 4e1f1a7431..d8bdb48712 100644
--- a/contrib/coccinelle/object_id.cocci
+++ b/contrib/coccinelle/object_id.cocci
@@ -129,3 +129,12 @@ expression E1, E2;
@@
- oidcmp(E1, E2) != 0
+ !oideq(E1, E2)
+
+@@
+identifier f != hasheq;
+expression E1, E2;
+@@
+ f(...) {<...
+- hashcmp(E1, E2) != 0
++ !hasheq(E1, E2)
+ ...>}