diff options
Diffstat (limited to 'third_party/git/contrib/coccinelle/object_id.cocci')
-rw-r--r-- | third_party/git/contrib/coccinelle/object_id.cocci | 32 |
1 files changed, 32 insertions, 0 deletions
diff --git a/third_party/git/contrib/coccinelle/object_id.cocci b/third_party/git/contrib/coccinelle/object_id.cocci index ddf4f22bd722..3e536a9834b6 100644 --- a/third_party/git/contrib/coccinelle/object_id.cocci +++ b/third_party/git/contrib/coccinelle/object_id.cocci @@ -13,6 +13,38 @@ struct object_id *OIDPTR; @@ struct object_id OID; @@ +- sha1_to_hex(OID.hash) ++ oid_to_hex(&OID) + +@@ +identifier f != oid_to_hex; +struct object_id *OIDPTR; +@@ + f(...) {<... +- sha1_to_hex(OIDPTR->hash) ++ oid_to_hex(OIDPTR) + ...>} + +@@ +expression E; +struct object_id OID; +@@ +- sha1_to_hex_r(E, OID.hash) ++ oid_to_hex_r(E, &OID) + +@@ +identifier f != oid_to_hex_r; +expression E; +struct object_id *OIDPTR; +@@ + f(...) {<... +- sha1_to_hex_r(E, OIDPTR->hash) ++ oid_to_hex_r(E, OIDPTR) + ...>} + +@@ +struct object_id OID; +@@ - hashclr(OID.hash) + oidclr(&OID) |