midx: read objects from multi-pack-index
Signed-off-by: Derrick Stolee <dstolee@microsoft.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
This commit is contained in:

committed by
Junio C Hamano

parent
c4d25228eb
commit
3715a6335c
@ -1902,11 +1902,17 @@ static int fill_pack_entry(const struct object_id *oid,
|
||||
int find_pack_entry(struct repository *r, const struct object_id *oid, struct pack_entry *e)
|
||||
{
|
||||
struct list_head *pos;
|
||||
struct multi_pack_index *m;
|
||||
|
||||
prepare_packed_git(r);
|
||||
if (!r->objects->packed_git)
|
||||
if (!r->objects->packed_git && !r->objects->multi_pack_index)
|
||||
return 0;
|
||||
|
||||
for (m = r->objects->multi_pack_index; m; m = m->next) {
|
||||
if (fill_midx_entry(oid, e, m))
|
||||
return 1;
|
||||
}
|
||||
|
||||
list_for_each(pos, &r->objects->packed_git_mru) {
|
||||
struct packed_git *p = list_entry(pos, struct packed_git, mru);
|
||||
if (fill_pack_entry(oid, e, p)) {
|
||||
|
Reference in New Issue
Block a user