mirror of
https://github.com/git-for-windows/git.git
synced 2026-07-02 20:29:15 -05:00
When performing connectivity checks we have to figure out whether any of the new objects are promisor objects, as we cannot assume full connectivity if so. This check is performed by iterating through all packfiles in the repository and searching each of them for the given object. Of course, this mechanism is quite specific to implementation details of the object database, as we assume that it uses packfiles in the first place. Refactor the logic so that we instead use `odb_for_each_object_ext()` with an object prefix filter and the `ODB_FOR_EACH_OBJECT_PROMISOR_ONLY` flag. This will yield all objects that have the exact object name and that are part of a promisor pack in a generic way. Add a test to verify that we indeed use the optimization. Signed-off-by: Patrick Steinhardt <ps@pks.im> Signed-off-by: Junio C Hamano <gitster@pobox.com>
5.5 KiB
5.5 KiB