odb/source-packed: improve lookup when enumerating objects
When iterating through objects of a packed source that have a specific prefix we do so via two different methods: - When a multi-pack index is available we use that one to efficiently loop through all objects. - We then loop through all packfiles that aren't covered by a multi-pack index. Regardless of which mechanism we use, we then iterate through all the objects indexed by the respective data structure. Curiously though, while we use the indices for enumerating the objects, we completely ignore it for the actual object lookup. Instead, we call into the generic `odb_source_read_object_info()` function, which will itself consult the indices to figure out where the object in question even lives. This has two consequences: - It's inefficient, as we basically have to figure out the position of the object a second time. - It's subtly wrong, as it may now happen that a specific object will be looked up via a different pack in case it exists multiple times. This is unlikely to have any real-world consequences, but it's still the wrong thing to do. Fix the issue by using `packed_object_info()` directly. While at it, rename the `store` variable to `source`. Signed-off-by: Patrick Steinhardt <ps@pks.im> Signed-off-by: Junio C Hamano <gitster@pobox.com>