Merge branch 'nd/status-refresh-progress'
[gitweb.git] / contrib / coccinelle / object_id.cocci
index 548c02336d66322892eda611d1a2995fee47ae39..d8bdb4871273da92d937d30a787d8b149fbe1552 100644 (file)
@@ -114,3 +114,27 @@ expression E1, E2;
 @@
 - oidcmp(E1, E2) == 0
 + oideq(E1, E2)
+
+@@
+identifier f != hasheq;
+expression E1, E2;
+@@
+  f(...) {<...
+- hashcmp(E1, E2) == 0
++ hasheq(E1, E2)
+  ...>}
+
+@@
+expression E1, E2;
+@@
+- oidcmp(E1, E2) != 0
++ !oideq(E1, E2)
+
+@@
+identifier f != hasheq;
+expression E1, E2;
+@@
+  f(...) {<...
+- hashcmp(E1, E2) != 0
++ !hasheq(E1, E2)
+  ...>}