contrib/coccinelle: fix semantic patch for oid_to_hex_r()
authorRené Scharfe <l.s.r@web.de>
Thu, 15 Sep 2016 18:30:52 +0000 (20:30 +0200)
committerJunio C Hamano <gitster@pobox.com>
Thu, 15 Sep 2016 19:23:33 +0000 (12:23 -0700)
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>
contrib/coccinelle/object_id.cocci
index 8ccdbb5666cbc89cf85ce90f63d357b86c37bd30..0307624a03fc4c4fd5642d2b4ad853cfba5b6905 100644 (file)
@@ -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;