On Tue, Aug 13, 2024 at 12:09 AM Junio C Hamano <gitster@xxxxxxxxx> wrote: > Perhaps another simpler approach may be to use is_promisor_object() > function and get rid of this initial marking of these objects in > prepare_revision_walk() with the for_each_packed_object() loop, > which abuses the UNINTERESTING bit. The feature wants to exclude > objects contained in these packs, but does not want to exclude > objects that are referred to and outside of these packs, so > UNINTERESTING bit whose natural behaviour is to propagate down the > history is a very bad fit for it. We may be able to lose a lot of > existing code paths that say "if exclude_promisor_objects then do > this", and filter objects out with "is_promisor_object()" at the > output phase near get_revision(). I tried to go down this route. I removed the for_each_packed_object() loop and filter promisor commits in get_revision_1() instead. However, this only filtered promisor commits, not promisor trees and objects. A combined approach would be keeping the for_each_packed_object() loop, but only mark non-commit objects as UNINTERESTING there, and filter promisor commits in get_revision()?