{"thread":{"id":"57965","subject":"[PATCH] cocci: retire is_null_sha1() rule","startedAt":"2022-06-08T00:33:33Z","lastAt":"2022-06-08T00:33:33Z","messageCount":1,"participants":["Junio C Hamano"],"isPatch":true,"patchVersion":1,"patchTotal":null},"messages":[{"id":"456827","messageId":"xmqq7d5suoqt.fsf@gitster.g","threadId":"57965","inReplyTo":null,"subject":"[PATCH] cocci: retire is_null_sha1() rule","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2022-06-07T21:50:50Z","receivedAt":"2022-06-08T00:33:33Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Since 8d4d86b0 (cache: remove null_sha1, 2019-08-18) removed the\nis_null_sha1() function, rewrite rules to correct callers of the\nfunction to use is_null_oid() instead has become irrelevant, as any\nnew callers of the function will get caught by the compiler much\nmore quickly without spending cycles on Coccinelle.\n\nRemove these rules.\n\nSigned-off-by: Junio C Hamano <gitster@pobox.com>\n---\n contrib/coccinelle/object_id.cocci | 12 ------------\n 1 file changed, 12 deletions(-)\n\ndiff --git a/contrib/coccinelle/object_id.cocci b/contrib/coccinelle/object_id.cocci\nindex ddf4f22bd7..01f8d6935b 100644\n--- a/contrib/coccinelle/object_id.cocci\n+++ b/contrib/coccinelle/object_id.cocci\n@@ -1,15 +1,3 @@\n-@@\n-struct object_id OID;\n-@@\n-- is_null_sha1(OID.hash)\n-+ is_null_oid(&OID)\n-\n-@@\n-struct object_id *OIDPTR;\n-@@\n-- is_null_sha1(OIDPTR->hash)\n-+ is_null_oid(OIDPTR)\n-\n @@\n struct object_id OID;\n @@\n-- \n2.36.1-485-g100d6d3ce6\n\n"}]}