aboutsummaryrefslogtreecommitdiff
path: root/contrib
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2016-11-29 13:28:00 -0800
committerJunio C Hamano <gitster@pobox.com>2016-11-29 13:28:00 -0800
commite3c4323e23b59038c354ced895be7d9c2f3bbd4c (patch)
treed9cb7f210294b7655a0db5160fb2795ebbab8488 /contrib
parent91207f378460d91c2097e1135ac69fd73f797ff8 (diff)
parentc2bb0c1d1e957ec1418fa6013c8c1e3e0ef38afa (diff)
downloadgit-e3c4323e23b59038c354ced895be7d9c2f3bbd4c.tar.gz
git-e3c4323e23b59038c354ced895be7d9c2f3bbd4c.tar.xz
Merge branch 'rs/cocci' into maint
Improve the rule to convert "unsigned char [20]" into "struct object_id *" in contrib/coccinelle/ * rs/cocci: cocci: avoid self-references in object_id transformations
Diffstat (limited to 'contrib')
-rw-r--r--contrib/coccinelle/object_id.cocci15
1 files changed, 15 insertions, 0 deletions
diff --git a/contrib/coccinelle/object_id.cocci b/contrib/coccinelle/object_id.cocci
index 0307624a0..09afdbf99 100644
--- a/contrib/coccinelle/object_id.cocci
+++ b/contrib/coccinelle/object_id.cocci
@@ -17,10 +17,13 @@ expression E1;
+ oid_to_hex(&E1)
@@
+identifier f != oid_to_hex;
expression E1;
@@
+ f(...) {...
- sha1_to_hex(E1->hash)
+ oid_to_hex(E1)
+ ...}
@@
expression E1, E2;
@@ -29,10 +32,13 @@ expression E1, E2;
+ oid_to_hex_r(E1, &E2)
@@
+identifier f != oid_to_hex_r;
expression E1, E2;
@@
+ f(...) {...
- sha1_to_hex_r(E1, E2->hash)
+ oid_to_hex_r(E1, E2)
+ ...}
@@
expression E1;
@@ -41,10 +47,13 @@ expression E1;
+ oidclr(&E1)
@@
+identifier f != oidclr;
expression E1;
@@
+ f(...) {...
- hashclr(E1->hash)
+ oidclr(E1)
+ ...}
@@
expression E1, E2;
@@ -53,10 +62,13 @@ expression E1, E2;
+ oidcmp(&E1, &E2)
@@
+identifier f != oidcmp;
expression E1, E2;
@@
+ f(...) {...
- hashcmp(E1->hash, E2->hash)
+ oidcmp(E1, E2)
+ ...}
@@
expression E1, E2;
@@ -77,10 +89,13 @@ expression E1, E2;
+ oidcpy(&E1, &E2)
@@
+identifier f != oidcpy;
expression E1, E2;
@@
+ f(...) {...
- hashcpy(E1->hash, E2->hash)
+ oidcpy(E1, E2)
+ ...}
@@
expression E1, E2;