aboutsummaryrefslogtreecommitdiffstats
path: root/packfile.c
diff options
context:
space:
mode:
authorDerrick Stolee <dstolee@microsoft.com>2019-04-29 09:18:55 -0700
committerJunio C Hamano <gitster@pobox.com>2019-05-07 13:48:41 +0900
commit64404a24cf60761baba0e04a337c419f0e86c0f9 (patch)
tree78911ffb0018c9ee400b7cf92e921d76967c9256 /packfile.c
parentThe seventh batch (diff)
downloadgit-64404a24cf60761baba0e04a337c419f0e86c0f9.tar.xz
git-64404a24cf60761baba0e04a337c419f0e86c0f9.zip
midx: pass a repository pointer
Much of the multi-pack-index code focuses on the multi_pack_index struct, and so we only pass a pointer to the current one. However, we will insert a dependency on the packed_git linked list in a future change, so we will need a repository reference. Inserting these parameters is a significant enough change to split out. Signed-off-by: Derrick Stolee <dstolee@microsoft.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'packfile.c')
-rw-r--r--packfile.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/packfile.c b/packfile.c
index cdf6b6ec344..7b94a14726d 100644
--- a/packfile.c
+++ b/packfile.c
@@ -1035,7 +1035,7 @@ struct packed_git *get_all_packs(struct repository *r)
for (m = r->objects->multi_pack_index; m; m = m->next) {
uint32_t i;
for (i = 0; i < m->num_packs; i++) {
- if (!prepare_midx_pack(m, i)) {
+ if (!prepare_midx_pack(r, m, i)) {
m->packs[i]->next = p;
p = m->packs[i];
}
@@ -1998,7 +1998,7 @@ int find_pack_entry(struct repository *r, const struct object_id *oid, struct pa
return 0;
for (m = r->objects->multi_pack_index; m; m = m->next) {
- if (fill_midx_entry(oid, e, m))
+ if (fill_midx_entry(r, oid, e, m))
return 1;
}