summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--midx.c2
-rw-r--r--packfile.c1
2 files changed, 1 insertions, 2 deletions
diff --git a/midx.c b/midx.c
index 8022be9a45..24e1e72175 100644
--- a/midx.c
+++ b/midx.c
@@ -462,8 +462,6 @@ int prepare_midx_pack(struct multi_pack_index *m,
m->pack_names[pack_int_id]);
p = packfile_store_load_pack(r->objects->packfiles,
pack_name.buf, m->source->local);
- if (p)
- packfile_list_append(&m->source->odb->packfiles->mru, p);
strbuf_release(&pack_name);
if (!p) {
diff --git a/packfile.c b/packfile.c
index 71e95ae11c..60f2e42876 100644
--- a/packfile.c
+++ b/packfile.c
@@ -871,6 +871,7 @@ void packfile_store_add_pack(struct packfile_store *store,
pack_open_fds++;
packfile_list_prepend(&store->packs, pack);
+ packfile_list_append(&store->mru, pack);
strmap_put(&store->packs_by_path, pack->pack_name, pack);
}