midx: prevent duplicate packfile loads
commitf3a002bd84790e89399c3a18f1e7101b850ed6f8
authorDerrick Stolee <stolee@gmail.com>
Thu, 12 Jul 2018 19:39:38 +0000 (12 15:39 -0400)
committerJunio C Hamano <gitster@pobox.com>
Fri, 20 Jul 2018 18:27:29 +0000 (20 11:27 -0700)
tree0ad8fdb436d6c9bfa37fb96558a55bddefeaa54f
parentb8990fbfedf7cd9fc92a5208b0fbbd7dad79be6d
midx: prevent duplicate packfile loads

The multi-pack-index, when present, tracks the existence of objects and
their offsets within a list of packfiles. This allows us to use the
multi-pack-index for object lookups, abbreviations, and object counts.

When the multi-pack-index tracks a packfile, then we do not need to add
that packfile to the packed_git linked list or the MRU list.

We still need to load the packfiles that are not tracked by the
multi-pack-index.

Signed-off-by: Derrick Stolee <dstolee@microsoft.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
packfile.c