Browse Source

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>
maint
René Scharfe 8 years ago committed by Junio C Hamano
parent
commit
76d156766f
  1. 12
      contrib/coccinelle/object_id.cocci

12
contrib/coccinelle/object_id.cocci

@ -23,16 +23,16 @@ expression E1;
+ oid_to_hex(E1) + oid_to_hex(E1)


@@ @@
expression E1; expression E1, E2;
@@ @@
- sha1_to_hex_r(E1.hash) - sha1_to_hex_r(E1, E2.hash)
+ oid_to_hex_r(&E1) + oid_to_hex_r(E1, &E2)


@@ @@
expression E1; expression E1, E2;
@@ @@
- sha1_to_hex_r(E1->hash) - sha1_to_hex_r(E1, E2->hash)
+ oid_to_hex_r(E1) + oid_to_hex_r(E1, E2)


@@ @@
expression E1; expression E1;

Loading…
Cancel
Save