Re: [PATCH v3 4/4] connected: search promisor objects generically
- From
Junio C Hamano <gitster@pobox.com>
- Date
- Jun 25, 2026, 20:22 UTC
- Message-ID
- <xmqq4iiqfk0l.fsf@gitster.g>
- In-Reply-To
- <20260625-pks-connected-generic-promisor-checks-v3-4-7308f3b9dc44@pks.im>
Patrick Steinhardt <ps@pks.im> writes:
Show 15 quoted lines
> 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.
OK. The new test is a good way to catch the issue we noticed in the previous round, I guess. Looking good.
Thanks.