aboutsummaryrefslogtreecommitdiffstats
path: root/fetch-pack.c
diff options
context:
space:
mode:
authorPatrick Steinhardt <ps@pks.im>2025-07-01 14:22:27 +0200
committerJunio C Hamano <gitster@pobox.com>2025-07-01 14:46:38 -0700
commitfcf8e3e111ec46705f91151baee40f2c0a3637da (patch)
treead6f80efc085178b284a8ab8fd2773b4f3259782 /fetch-pack.c
parentd4ff88aee3967e5d1ef1237cd9b8792b7cdb304c (diff)
downloadgit-fcf8e3e111ec46705f91151baee40f2c0a3637da.tar.gz
odb: rename `has_object()`
Rename `has_object()` to `odb_has_object()` to match other functions related to the object database and our modern coding guidelines. Introduce a compatibility wrapper so that any in-flight topics will continue to compile. Signed-off-by: Patrick Steinhardt <ps@pks.im> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'fetch-pack.c')
-rw-r--r--fetch-pack.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/fetch-pack.c b/fetch-pack.c
index 0f5de1c94d..5e74235fc0 100644
--- a/fetch-pack.c
+++ b/fetch-pack.c
@@ -142,7 +142,7 @@ static struct commit *deref_without_lazy_fetch(const struct object_id *oid,
commit = lookup_commit_in_graph(the_repository, oid);
if (commit) {
if (mark_tags_complete_and_check_obj_db) {
- if (!has_object(the_repository, oid, 0))
+ if (!odb_has_object(the_repository->objects, oid, 0))
die_in_commit_graph_only(oid);
}
return commit;
@@ -770,7 +770,7 @@ static void mark_complete_and_common_ref(struct fetch_negotiator *negotiator,
if (!commit) {
struct object *o;
- if (!has_object(the_repository, &ref->old_oid, 0))
+ if (!odb_has_object(the_repository->objects, &ref->old_oid, 0))
continue;
o = parse_object(the_repository, &ref->old_oid);
if (!o || o->type != OBJ_COMMIT)
@@ -1984,8 +1984,8 @@ static void update_shallow(struct fetch_pack_args *args,
struct oid_array extra = OID_ARRAY_INIT;
struct object_id *oid = si->shallow->oid;
for (i = 0; i < si->shallow->nr; i++)
- if (has_object(the_repository, &oid[i],
- HAS_OBJECT_RECHECK_PACKED | HAS_OBJECT_FETCH_PROMISOR))
+ if (odb_has_object(the_repository->objects, &oid[i],
+ HAS_OBJECT_RECHECK_PACKED | HAS_OBJECT_FETCH_PROMISOR))
oid_array_append(&extra, &oid[i]);
if (extra.nr) {
setup_alternate_shallow(&shallow_lock,