summaryrefslogtreecommitdiff
path: root/contrib/coccinelle
diff options
context:
space:
mode:
authorLibravatar René Scharfe <l.s.r@web.de>2016-09-15 20:30:52 +0200
committerLibravatar Junio C Hamano <gitster@pobox.com>2016-09-15 12:23:33 -0700
commit76d156766fc9364ed2ce1b07f0867cbbdc5932f4 (patch)
tree2e8743dd902257f800b2f21a3e8d9dee8739ec5b /contrib/coccinelle
parentMerge tag 'l10n-2.10.0-rnd2.3' of git://github.com/git-l10n/git-po into maint (diff)
downloadtgif-76d156766fc9364ed2ce1b07f0867cbbdc5932f4.tar.xz
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 8ccdbb5666..0307624a03 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;