diff options
| author | Patrick Steinhardt <ps@pks.im> | 2025-07-15 13:29:24 +0200 |
|---|---|---|
| committer | Junio C Hamano <gitster@pobox.com> | 2025-07-15 12:07:30 -0700 |
| commit | ec865d94d4615c00fbf9ac50f4274b1d3fbf73a6 (patch) | |
| tree | 81c186dea2a578e987ba03eab2f232a140739fbb /midx.c | |
| parent | c620586fccf5a62e36a2d6cc96d0427f93f123fc (diff) | |
| download | git-ec865d94d4615c00fbf9ac50f4274b1d3fbf73a6.tar.gz | |
midx: remove now-unused linked list of multi-pack indices
In the preceding commits we have migrated all users of the linked list
of multi-pack indices to instead use those stored in the object database
sources. Remove those now-unused pointers.
Signed-off-by: Patrick Steinhardt <ps@pks.im>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'midx.c')
| -rw-r--r-- | midx.c | 18 |
1 files changed, 2 insertions, 16 deletions
@@ -726,7 +726,6 @@ int midx_preferred_pack(struct multi_pack_index *m, uint32_t *pack_int_id) int prepare_multi_pack_index_one(struct odb_source *source, int local) { struct repository *r = source->odb->repo; - struct multi_pack_index *m; prepare_repo_settings(r); if (!r->settings.core_multi_pack_index) @@ -735,21 +734,9 @@ int prepare_multi_pack_index_one(struct odb_source *source, int local) if (source->midx) return 1; - m = load_multi_pack_index(r, source->path, local); - if (m) { - struct multi_pack_index *mp = r->objects->multi_pack_index; - if (mp) { - m->next = mp->next; - mp->next = m; - } else { - r->objects->multi_pack_index = m; - } - source->midx = m; + source->midx = load_multi_pack_index(r, source->path, local); - return 1; - } - - return 0; + return !!source->midx; } int midx_checksum_valid(struct multi_pack_index *m) @@ -842,7 +829,6 @@ void clear_midx_file(struct repository *r) close_midx(source->midx); source->midx = NULL; } - r->objects->multi_pack_index = NULL; } if (remove_path(midx.buf)) |
