Re: [PATCH 0/1] revision: fix reachable objects being gc'ed in no blob clone repo
- From
- Jonathan Tan <jonathantanmy@google.com>
- Date
- Aug 14, 2024, 19:30 UTC
- Message-ID
- <20240814193036.3918771-1-jonathantanmy@google.com>
- In-Reply-To
- <xmqqsev73ftc.fsf@gitster.g>
Junio C Hamano <gitster@pobox.com> writes:
Show 20 quoted lines
> Jonathan Tan <jonathantanmy@google.com> writes: > > > Jonathan Tan <jonathantanmy@google.com> writes: > >> Solutions I can think of: > > > > One more thing that I just thought of regarding the solution in this > > patch. It seems to be to have a different separation of packs: all > > objects currently in promisor packs and all objects currently not > > in promisor packs. And the way it is done is to only exclude (in > > this patch, mark UNINTERESTING, although it might be better to have > > a separate flag for it) objects in promisor packs, but not their > > ancestors. > > You're right to mention two separate bits, especially because you do > not want the "I am in a promisor pack" bit to propagate down to the > ancestry chain like UNINTERESTING bit does. But isn't the approach > to enumerate all objects in promisor packs in an oidset and give a > quick way for is_promisor_object() to answer if an object is or is > not in promisor pack sufficient to replace the need to use _any_ > object flag bits to manage objects in promisor packs?
Ah...yes, you're right. But if someone is intending to go this route, note that you can't use the oidset in is_promisor_object() directly, as it contains both objects in promisor packs and objects that they directly reference. You'll need to adapt it.