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>
René Scharfe committed
Sep 15, 2016 at 20:30 UTC
76d156766fc9364ed2ce1b07f0867cbbdc5932f4
1 file changed
+6
-6
contrib/coccinelle/object_id.cocci
+6
-6
@@ -23,16 +23,16 @@ expression E1;
23
+ oid_to_hex(E1)
24
25
@@
26
-expression E1;
26
+expression E1, E2;
27
@@
28
-- sha1_to_hex_r(E1.hash)
29
-+ oid_to_hex_r(&E1)
28
+- sha1_to_hex_r(E1, E2.hash)
29
++ oid_to_hex_r(E1, &E2)
30
31
@@
32
-expression E1;
32
+expression E1, E2;
33
@@
34
-- sha1_to_hex_r(E1->hash)
35
-+ oid_to_hex_r(E1)
34
+- sha1_to_hex_r(E1, E2->hash)
35
++ oid_to_hex_r(E1, E2)
36
37
@@
38
expression E1;