{"thread":{"id":"44092","subject":"[PATCH] contrib/coccinelle: fix semantic patch for oid_to_hex_r()","startedAt":"2016-09-15T18:31:35Z","lastAt":"2016-09-15T18:31:35Z","messageCount":1,"participants":["René Scharfe"],"isPatch":true,"patchVersion":1,"patchTotal":null},"messages":[{"id":"301992","messageId":"423e8ce2-354b-3088-e051-ff44f53806cb@web.de","threadId":"44092","inReplyTo":null,"subject":"[PATCH] contrib/coccinelle: fix semantic patch for oid_to_hex_r()","fromName":"René Scharfe","fromEmail":"l.s.r@web.de","sentAt":"2016-09-15T18:30:52Z","receivedAt":"2016-09-15T18:31:35Z","isPatch":true,"sender":{"key":"l.s.r@web.de","avatar":"https://avatars.githubusercontent.com/u/26122331?v=4"},"body":"Both sha1_to_hex_r() and oid_to_hex_r() take two parameters, so use two\nexpressions in the semantic patch for transforming calls of the former\nto the latter one.\n\nSigned-off-by: Rene Scharfe <l.s.r@web.de>\n---\n contrib/coccinelle/object_id.cocci | 12 ++++++------\n 1 file changed, 6 insertions(+), 6 deletions(-)\n\ndiff --git a/contrib/coccinelle/object_id.cocci b/contrib/coccinelle/object_id.cocci\nindex 8ccdbb5..0307624 100644\n--- a/contrib/coccinelle/object_id.cocci\n+++ b/contrib/coccinelle/object_id.cocci\n@@ -23,16 +23,16 @@ expression E1;\n + oid_to_hex(E1)\n \n @@\n-expression E1;\n+expression E1, E2;\n @@\n-- sha1_to_hex_r(E1.hash)\n-+ oid_to_hex_r(&E1)\n+- sha1_to_hex_r(E1, E2.hash)\n++ oid_to_hex_r(E1, &E2)\n \n @@\n-expression E1;\n+expression E1, E2;\n @@\n-- sha1_to_hex_r(E1->hash)\n-+ oid_to_hex_r(E1)\n+- sha1_to_hex_r(E1, E2->hash)\n++ oid_to_hex_r(E1, E2)\n \n @@\n expression E1;\n-- \n2.10.0\n\n"}]}