Skip to content

Commit 89ef49b

Browse files
avargitster
authored andcommitted
object-store.h: remove unused has_sha1_file*()
These macros were last used in 5d3679e (sha1-file: drop has_sha1_file(), 2019-01-07), so let's remove coccinelle migration rules added 9b45f49 (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>
1 parent b676b73 commit 89ef49b

File tree

2 files changed

+0
-19
lines changed

2 files changed

+0
-19
lines changed

contrib/coccinelle/the_repository.pending.cocci

Lines changed: 0 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -11,21 +11,6 @@ expression G;
1111
+ repo_read_object_file(the_repository,
1212
E, F, G)
1313

14-
@@
15-
expression E;
16-
@@
17-
- has_sha1_file(
18-
+ repo_has_sha1_file(the_repository,
19-
E)
20-
21-
@@
22-
expression E;
23-
expression F;
24-
@@
25-
- has_sha1_file_with_flags(
26-
+ repo_has_sha1_file_with_flags(the_repository,
27-
E)
28-
2914
@@
3015
expression E;
3116
@@

object-store.h

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -312,10 +312,6 @@ int has_object(struct repository *r, const struct object_id *oid,
312312
* These functions can be removed once all callers have migrated to
313313
* has_object() and/or oid_object_info_extended().
314314
*/
315-
#ifndef NO_THE_REPOSITORY_COMPATIBILITY_MACROS
316-
#define has_sha1_file_with_flags(sha1, flags) repo_has_sha1_file_with_flags(the_repository, sha1, flags)
317-
#define has_sha1_file(sha1) repo_has_sha1_file(the_repository, sha1)
318-
#endif
319315
int repo_has_object_file(struct repository *r, const struct object_id *oid);
320316
int repo_has_object_file_with_flags(struct repository *r,
321317
const struct object_id *oid, int flags);

0 commit comments

Comments
 (0)