Skip to content

Commit 8a9e27b

Browse files
pks-tgitster
authored andcommitted
object-store: drop repo_has_object_file()
In the preceding commits we have converted all users of `repo_has_object_file()` and its `_with_flags()` variant to instead use `has_object()`. Drop these functions. Signed-off-by: Patrick Steinhardt <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent 062b914 commit 8a9e27b

File tree

2 files changed

+0
-31
lines changed

2 files changed

+0
-31
lines changed

object-store.c

Lines changed: 0 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -949,20 +949,6 @@ int has_object(struct repository *r, const struct object_id *oid,
949949
return oid_object_info_extended(r, oid, NULL, object_info_flags) >= 0;
950950
}
951951

952-
int repo_has_object_file_with_flags(struct repository *r,
953-
const struct object_id *oid, int flags)
954-
{
955-
if (!startup_info->have_repository)
956-
return 0;
957-
return oid_object_info_extended(r, oid, NULL, flags) >= 0;
958-
}
959-
960-
int repo_has_object_file(struct repository *r,
961-
const struct object_id *oid)
962-
{
963-
return repo_has_object_file_with_flags(r, oid, 0);
964-
}
965-
966952
void assert_oid_type(const struct object_id *oid, enum object_type expect)
967953
{
968954
enum object_type type = oid_object_info(the_repository, oid, NULL);

object-store.h

Lines changed: 0 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -276,23 +276,6 @@ enum {
276276
int has_object(struct repository *r, const struct object_id *oid,
277277
unsigned flags);
278278

279-
/*
280-
* These macros and functions are deprecated. If checking existence for an
281-
* object that is likely to be missing and/or whose absence is relatively
282-
* inconsequential (or is consequential but the caller is prepared to handle
283-
* it), use has_object(), which has better defaults (no lazy fetch in a partial
284-
* clone and no rechecking of packed storage). In the unlikely event that a
285-
* caller needs to assert existence of an object that it fully expects to
286-
* exist, and wants to trigger a lazy fetch in a partial clone, use
287-
* oid_object_info_extended() with a NULL struct object_info.
288-
*
289-
* These functions can be removed once all callers have migrated to
290-
* has_object() and/or oid_object_info_extended().
291-
*/
292-
int repo_has_object_file(struct repository *r, const struct object_id *oid);
293-
int repo_has_object_file_with_flags(struct repository *r,
294-
const struct object_id *oid, int flags);
295-
296279
void assert_oid_type(const struct object_id *oid, enum object_type expect);
297280

298281
/*

0 commit comments

Comments
 (0)