diff options
| author | Junio C Hamano <gitster@pobox.com> | 2023-04-06 13:38:30 -0700 |
|---|---|---|
| committer | Junio C Hamano <gitster@pobox.com> | 2023-04-06 13:38:30 -0700 |
| commit | 72871b198f50962a555685726e42f435cdd4efa1 (patch) | |
| tree | 1ebe027331745e509d7f873b7d3a030c863ee0a6 /builtin/index-pack.c | |
| parent | 06e9e726d463b413d45703b31881de4ed99b3417 (diff) | |
| parent | 4a93b899c19794c28b140bf78a13fb9c2b34f433 (diff) | |
| download | git-72871b198f50962a555685726e42f435cdd4efa1.tar.gz | |
Merge branch 'ab/remove-implicit-use-of-the-repository'
Code clean-up around the use of the_repository.
* ab/remove-implicit-use-of-the-repository:
libs: use "struct repository *" argument, not "the_repository"
post-cocci: adjust comments for recent repo_* migration
cocci: apply the "revision.h" part of "the_repository.pending"
cocci: apply the "rerere.h" part of "the_repository.pending"
cocci: apply the "refs.h" part of "the_repository.pending"
cocci: apply the "promisor-remote.h" part of "the_repository.pending"
cocci: apply the "packfile.h" part of "the_repository.pending"
cocci: apply the "pretty.h" part of "the_repository.pending"
cocci: apply the "object-store.h" part of "the_repository.pending"
cocci: apply the "diff.h" part of "the_repository.pending"
cocci: apply the "commit.h" part of "the_repository.pending"
cocci: apply the "commit-reach.h" part of "the_repository.pending"
cocci: apply the "cache.h" part of "the_repository.pending"
cocci: add missing "the_repository" macros to "pending"
cocci: sort "the_repository" rules by header
cocci: fix incorrect & verbose "the_repository" rules
cocci: remove dead rule from "the_repository.pending.cocci"
Diffstat (limited to 'builtin/index-pack.c')
| -rw-r--r-- | builtin/index-pack.c | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/builtin/index-pack.c b/builtin/index-pack.c index b451755f40..6bd95f54d6 100644 --- a/builtin/index-pack.c +++ b/builtin/index-pack.c @@ -804,7 +804,8 @@ static void sha1_object(const void *data, struct object_entry *obj_entry, if (startup_info->have_repository) { read_lock(); collision_test_needed = - has_object_file_with_flags(oid, OBJECT_INFO_QUICK); + repo_has_object_file_with_flags(the_repository, oid, + OBJECT_INFO_QUICK); read_unlock(); } @@ -824,7 +825,8 @@ static void sha1_object(const void *data, struct object_entry *obj_entry, die(_("cannot read existing object info %s"), oid_to_hex(oid)); if (has_type != type || has_size != size) die(_("SHA1 COLLISION FOUND WITH %s !"), oid_to_hex(oid)); - has_data = read_object_file(oid, &has_type, &has_size); + has_data = repo_read_object_file(the_repository, oid, + &has_type, &has_size); read_unlock(); if (!data) data = new_data = get_data_from_pack(obj_entry); @@ -1391,7 +1393,7 @@ static void fix_unresolved_deltas(struct hashfile *f) sorted_by_pos[i] = &ref_deltas[i]; QSORT(sorted_by_pos, nr_ref_deltas, delta_pos_compare); - if (has_promisor_remote()) { + if (repo_has_promisor_remote(the_repository)) { /* * Prefetch the delta bases. */ @@ -1417,7 +1419,8 @@ static void fix_unresolved_deltas(struct hashfile *f) if (objects[d->obj_no].real_type != OBJ_REF_DELTA) continue; - data = read_object_file(&d->oid, &type, &size); + data = repo_read_object_file(the_repository, &d->oid, &type, + &size); if (!data) continue; |
