]> git.ipfire.org Git - thirdparty/git.git/commitdiff
cocci: retire is_null_sha1() rule
authorJunio C Hamano <gitster@pobox.com>
Tue, 7 Jun 2022 21:50:50 +0000 (14:50 -0700)
committerJunio C Hamano <gitster@pobox.com>
Tue, 7 Jun 2022 22:53:24 +0000 (15:53 -0700)
Since 8d4d86b0 (cache: remove null_sha1, 2019-08-18) removed the
is_null_sha1() function, rewrite rules to correct callers of the
function to use is_null_oid() instead has become irrelevant, as any
new callers of the function will get caught by the compiler much
more quickly without spending cycles on Coccinelle.

Remove these rules.

Signed-off-by: Junio C Hamano <gitster@pobox.com>
contrib/coccinelle/object_id.cocci

index ddf4f22bd722fdad0ce585a660d06dcc4214648b..01f8d6935b203feebeb421d2899622bce25a2f02 100644 (file)
@@ -1,15 +1,3 @@
-@@
-struct object_id OID;
-@@
-- is_null_sha1(OID.hash)
-+ is_null_oid(&OID)
-
-@@
-struct object_id *OIDPTR;
-@@
-- is_null_sha1(OIDPTR->hash)
-+ is_null_oid(OIDPTR)
-
 @@
 struct object_id OID;
 @@