mirror of
https://github.com/git/git.git
synced 2026-01-11 13:23:12 +09:00
packfile: only prepare owning store in packfile_store_get_packs()
When calling `packfile_store_get_packs()` we prepare not only the provided packfile store, but also all those of all other sources part of the same object database. This was required when the store was still sitting on the object database level. But now that it sits on the source level it's not anymore. Adapt the code so that we only prepare the MIDX of the provided store. All callers only work in the context of a single store or call the function in a loop over all sources, so this change shouldn't have any practical effects. Signed-off-by: Patrick Steinhardt <ps@pks.im> Signed-off-by: Junio C Hamano <gitster@pobox.com>
This commit is contained in:
parent
84f0e60b28
commit
7b330a11de
@ -1092,10 +1092,8 @@ struct packfile_list_entry *packfile_store_get_packs(struct packfile_store *stor
|
||||
{
|
||||
packfile_store_prepare(store);
|
||||
|
||||
for (struct odb_source *source = store->source->odb->sources; source; source = source->next) {
|
||||
struct multi_pack_index *m = source->midx;
|
||||
if (!m)
|
||||
continue;
|
||||
if (store->source->midx) {
|
||||
struct multi_pack_index *m = store->source->midx;
|
||||
for (uint32_t i = 0; i < m->num_packs + m->num_packs_in_base; i++)
|
||||
prepare_midx_pack(m, i);
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user