summaryrefslogtreecommitdiff
path: root/contrib/coccinelle
diff options
context:
space:
mode:
authorRené Scharfe <l.s.r@web.de>2016-09-15 18:30:52 (GMT)
committerJunio C Hamano <gitster@pobox.com>2016-09-15 19:23:33 (GMT)
commit76d156766fc9364ed2ce1b07f0867cbbdc5932f4 (patch)
tree2e8743dd902257f800b2f21a3e8d9dee8739ec5b /contrib/coccinelle
parent91942260a2a8c8659450159dda73702f5cbda528 (diff)
downloadgit-76d156766fc9364ed2ce1b07f0867cbbdc5932f4.zip
git-76d156766fc9364ed2ce1b07f0867cbbdc5932f4.tar.gz
git-76d156766fc9364ed2ce1b07f0867cbbdc5932f4.tar.bz2
contrib/coccinelle: fix semantic patch for oid_to_hex_r()
Both sha1_to_hex_r() and oid_to_hex_r() take two parameters, so use two expressions in the semantic patch for transforming calls of the former to the latter one. Signed-off-by: Rene Scharfe <l.s.r@web.de> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'contrib/coccinelle')
-rw-r--r--contrib/coccinelle/object_id.cocci12
1 files changed, 6 insertions, 6 deletions
diff --git a/contrib/coccinelle/object_id.cocci b/contrib/coccinelle/object_id.cocci
index 8ccdbb5..0307624 100644
--- a/contrib/coccinelle/object_id.cocci
+++ b/contrib/coccinelle/object_id.cocci
@@ -23,16 +23,16 @@ expression E1;
+ oid_to_hex(E1)
@@
-expression E1;
+expression E1, E2;
@@
-- sha1_to_hex_r(E1.hash)
-+ oid_to_hex_r(&E1)
+- sha1_to_hex_r(E1, E2.hash)
++ oid_to_hex_r(E1, &E2)
@@
-expression E1;
+expression E1, E2;
@@
-- sha1_to_hex_r(E1->hash)
-+ oid_to_hex_r(E1)
+- sha1_to_hex_r(E1, E2->hash)
++ oid_to_hex_r(E1, E2)
@@
expression E1;