Thread (41 messages) 41 messages, 5 authors, 4d ago

Re: [PATCH 2/4] pack-objects: ensure tree/tag closure with '--stdin-packs=follow'

flat view

From: Derrick Stolee <hidden>
Date: 2026-09-30 18:16:57

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.
quoted hunk ↗ jump to hunk
@@ -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
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help