]> git.ipfire.org Git - thirdparty/git.git/commitdiff
object-store.h: remove unused has_sha1_file*()
authorÆvar Arnfjörð Bjarmason <avarab@gmail.com>
Thu, 31 Mar 2022 01:45:54 +0000 (03:45 +0200)
committerJunio C Hamano <gitster@pobox.com>
Fri, 1 Apr 2022 17:16:10 +0000 (10:16 -0700)
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 <avarab@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
contrib/coccinelle/the_repository.pending.cocci
object-store.h

index 2ee702ecf7fe9d45c2c28faa7eccc79cba38e184..072ea0d92287a780f80a4d8e0ecb1cd46bdcd064 100644 (file)
@@ -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;
 @@
index bd2322ed8ce3368d8b06ab570f2f1f4c2217d757..53996018c1106b1552898c718f7fb903fdb294b2 100644 (file)
@@ -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);