From: Derrick Stolee Date: Wed, 30 Sep 2026 18:16:53 GMT Subject: Re: [PATCH 2/4] pack-objects: ensure tree/tag closure with '--stdin-packs=follow' Message-ID: In-Reply-To: <6348667e2e3fe63aeb139888e877dd8447570253.1790731662.git.me@ttaylorr.com> On 9/29/2026 9:28 PM, Taylor Blau wrote: > Add trees and tags from included and '!' packs (and loose ones with > '--unpacked') as roots in '--stdin-packs=follow' mode. This rescues > their descendants even when no input commit reaches them. Walk these > roots after the existing traversal, preserving the `SEEN` bit to avoid > redundant traversals. Ensure that the walk takes place *after* the > existing traversal so that we don't lose the path prefix used for trees > and blobs wherever possible. > @@ -3807,6 +3807,7 @@ static int stdin_packs_hints_nr; > struct stdin_packs_context { > struct rev_info *revs; > enum stdin_packs_mode mode; > + struct oid_array extra_roots; I believe this should be an oidset to avoid adding duplicate objects that appear multiple times. The order of these extra roots doesn't matter (such as in a --topo-order walk). We only care about the binary "reachable or not?" question. Thanks, -Stolee