Git fork

Merge branch 'ps/odb-clean-stale-wrappers'

Code clean-up.

* ps/odb-clean-stale-wrappers:
odb: drop deprecated wrapper functions

+8 -42
+3 -3
builtin/pack-objects.c
··· 3774 3774 enum stdin_packs_mode mode = *(enum stdin_packs_mode *)data; 3775 3775 if (mode == STDIN_PACKS_MODE_FOLLOW) { 3776 3776 if (object->type == OBJ_BLOB && 3777 - !has_object(the_repository, &object->oid, 0)) 3777 + !odb_has_object(the_repository->objects, &object->oid, 0)) 3778 3778 return; 3779 3779 add_object_entry(&object->oid, object->type, name, 0); 3780 3780 } else { ··· 4596 4596 4597 4597 /* Skip objects that do not exist locally. */ 4598 4598 if ((exclude_promisor_objects || arg_missing_action != MA_ERROR) && 4599 - oid_object_info_extended(the_repository, oid, &oi, 4600 - OBJECT_INFO_FOR_PREFETCH) < 0) 4599 + odb_read_object_info_extended(the_repository->objects, oid, &oi, 4600 + OBJECT_INFO_FOR_PREFETCH) < 0) 4601 4601 continue; 4602 4602 4603 4603 exclude = is_oid_uninteresting(the_repository, oid);
-33
odb.h
··· 489 489 return odb_write_object_ext(odb, buf, len, type, oid, NULL, 0); 490 490 } 491 491 492 - /* Compatibility wrappers, to be removed once Git 2.51 has been released. */ 493 - #include "repository.h" 494 - 495 - static inline int oid_object_info_extended(struct repository *r, 496 - const struct object_id *oid, 497 - struct object_info *oi, 498 - unsigned flags) 499 - { 500 - return odb_read_object_info_extended(r->objects, oid, oi, flags); 501 - } 502 - 503 - static inline int oid_object_info(struct repository *r, 504 - const struct object_id *oid, 505 - unsigned long *sizep) 506 - { 507 - return odb_read_object_info(r->objects, oid, sizep); 508 - } 509 - 510 - static inline void *repo_read_object_file(struct repository *r, 511 - const struct object_id *oid, 512 - enum object_type *type, 513 - unsigned long *size) 514 - { 515 - return odb_read_object(r->objects, oid, type, size); 516 - } 517 - 518 - static inline int has_object(struct repository *r, 519 - const struct object_id *oid, 520 - unsigned flags) 521 - { 522 - return odb_has_object(r->objects, oid, flags); 523 - } 524 - 525 492 #endif /* ODB_H */
+1
pack-objects.c
··· 4 4 #include "pack-objects.h" 5 5 #include "packfile.h" 6 6 #include "parse.h" 7 + #include "repository.h" 7 8 8 9 static uint32_t locate_object_entry_hash(struct packing_data *pdata, 9 10 const struct object_id *oid,
+4 -6
t/helper/test-pack-deltas.c
··· 51 51 unsigned long size, base_size, delta_size, compressed_size, hdrlen; 52 52 enum object_type type; 53 53 void *base_buf, *delta_buf; 54 - void *buf = repo_read_object_file(the_repository, 55 - oid, &type, 56 - &size); 54 + void *buf = odb_read_object(the_repository->objects, 55 + oid, &type, &size); 57 56 58 57 if (!buf) 59 58 die("unable to read %s", oid_to_hex(oid)); 60 59 61 - base_buf = repo_read_object_file(the_repository, 62 - base, &type, 63 - &base_size); 60 + base_buf = odb_read_object(the_repository->objects, 61 + base, &type, &base_size); 64 62 65 63 if (!base_buf) 66 64 die("unable to read %s", oid_to_hex(base));