From 89ef49b30c09a0a8c96a59bbbb38065f89319af3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=86var=20Arnfj=C3=B6r=C3=B0=20Bjarmason?= Date: Thu, 31 Mar 2022 03:45:54 +0200 Subject: [PATCH] object-store.h: remove unused has_sha1_file*() MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit These macros were last used in 5d3679ee023 (sha1-file: drop has_sha1_file(), 2019-01-07), so let's remove coccinelle migration rules added 9b45f499818 (object-store: prepare has_{sha1, object}_file to handle any repo, 2018-11-13), along with the compatibility macros themselves. The "These functions.." in the diff context and the general comment about compatibility macros still applies to "NO_THE_REPOSITORY_COMPATIBILITY_MACROS" use just a few lines below this, so let's keep the comment. Signed-off-by: Ævar Arnfjörð Bjarmason Signed-off-by: Junio C Hamano --- contrib/coccinelle/the_repository.pending.cocci | 15 --------------- object-store.h | 4 ---- 2 files changed, 19 deletions(-) diff --git a/contrib/coccinelle/the_repository.pending.cocci b/contrib/coccinelle/the_repository.pending.cocci index 2ee702ecf7..072ea0d922 100644 --- a/contrib/coccinelle/the_repository.pending.cocci +++ b/contrib/coccinelle/the_repository.pending.cocci @@ -11,21 +11,6 @@ expression G; + repo_read_object_file(the_repository, E, F, G) -@@ -expression E; -@@ -- has_sha1_file( -+ repo_has_sha1_file(the_repository, - E) - -@@ -expression E; -expression F; -@@ -- has_sha1_file_with_flags( -+ repo_has_sha1_file_with_flags(the_repository, - E) - @@ expression E; @@ diff --git a/object-store.h b/object-store.h index bd2322ed8c..53996018c1 100644 --- a/object-store.h +++ b/object-store.h @@ -312,10 +312,6 @@ int has_object(struct repository *r, const struct object_id *oid, * These functions can be removed once all callers have migrated to * has_object() and/or oid_object_info_extended(). */ -#ifndef NO_THE_REPOSITORY_COMPATIBILITY_MACROS -#define has_sha1_file_with_flags(sha1, flags) repo_has_sha1_file_with_flags(the_repository, sha1, flags) -#define has_sha1_file(sha1) repo_has_sha1_file(the_repository, sha1) -#endif int repo_has_object_file(struct repository *r, const struct object_id *oid); int repo_has_object_file_with_flags(struct repository *r, const struct object_id *oid, int flags);