@@ -366,9 +366,9 @@ static void find_non_local_tags(const struct ref *refs,
366366 */
367367 if (ends_with (ref -> name , "^{}" )) {
368368 if (item &&
369- !has_object (the_repository , & ref -> old_oid , 0 ) &&
369+ !odb_has_object (the_repository -> objects , & ref -> old_oid , 0 ) &&
370370 !oidset_contains (& fetch_oids , & ref -> old_oid ) &&
371- !has_object (the_repository , & item -> oid , 0 ) &&
371+ !odb_has_object (the_repository -> objects , & item -> oid , 0 ) &&
372372 !oidset_contains (& fetch_oids , & item -> oid ))
373373 clear_item (item );
374374 item = NULL ;
@@ -382,7 +382,7 @@ static void find_non_local_tags(const struct ref *refs,
382382 * fetch.
383383 */
384384 if (item &&
385- !has_object (the_repository , & item -> oid , 0 ) &&
385+ !odb_has_object (the_repository -> objects , & item -> oid , 0 ) &&
386386 !oidset_contains (& fetch_oids , & item -> oid ))
387387 clear_item (item );
388388
@@ -403,7 +403,7 @@ static void find_non_local_tags(const struct ref *refs,
403403 * checked to see if it needs fetching.
404404 */
405405 if (item &&
406- !has_object (the_repository , & item -> oid , 0 ) &&
406+ !odb_has_object (the_repository -> objects , & item -> oid , 0 ) &&
407407 !oidset_contains (& fetch_oids , & item -> oid ))
408408 clear_item (item );
409409
@@ -910,8 +910,8 @@ static int update_local_ref(struct ref *ref,
910910 struct commit * current = NULL , * updated ;
911911 int fast_forward = 0 ;
912912
913- if (!has_object (the_repository , & ref -> new_oid ,
914- HAS_OBJECT_RECHECK_PACKED | HAS_OBJECT_FETCH_PROMISOR ))
913+ if (!odb_has_object (the_repository -> objects , & ref -> new_oid ,
914+ HAS_OBJECT_RECHECK_PACKED | HAS_OBJECT_FETCH_PROMISOR ))
915915 die (_ ("object %s not found" ), oid_to_hex (& ref -> new_oid ));
916916
917917 if (oideq (& ref -> old_oid , & ref -> new_oid )) {
@@ -1330,7 +1330,8 @@ static int check_exist_and_connected(struct ref *ref_map)
13301330 * we need all direct targets to exist.
13311331 */
13321332 for (r = rm ; r ; r = r -> next ) {
1333- if (!has_object (the_repository , & r -> old_oid , HAS_OBJECT_RECHECK_PACKED ))
1333+ if (!odb_has_object (the_repository -> objects , & r -> old_oid ,
1334+ HAS_OBJECT_RECHECK_PACKED ))
13341335 return -1 ;
13351336 }
13361337
@@ -1485,7 +1486,7 @@ static void add_negotiation_tips(struct git_transport_options *smart_options)
14851486 struct object_id oid ;
14861487 if (repo_get_oid (the_repository , s , & oid ))
14871488 die (_ ("%s is not a valid object" ), s );
1488- if (!has_object (the_repository , & oid , 0 ))
1489+ if (!odb_has_object (the_repository -> objects , & oid , 0 ))
14891490 die (_ ("the object %s does not exist" ), s );
14901491 oid_array_append (oids , & oid );
14911492 continue ;
0 commit comments