]> git.ipfire.org Git - thirdparty/git.git/commit
pack-objects: declare 'rev_info' for '--stdin-packs' earlier
authorTaylor Blau <me@ttaylorr.com>
Mon, 23 Jun 2025 22:32:18 +0000 (18:32 -0400)
committerJunio C Hamano <gitster@pobox.com>
Mon, 23 Jun 2025 22:41:36 +0000 (15:41 -0700)
commit97ec43247c01bc125fa9618e54f93a7dd0b52ab4
tree4ea3fffb70c91c78fd70ccb9d40e2db1724da30a
parent67e1a7827bf81f84ba8933d494e441139bd3f34d
pack-objects: declare 'rev_info' for '--stdin-packs' earlier

Once 'read_packs_list_from_stdin()' has called for_each_object_in_pack()
on each of the input packs, we do a reachability traversal to discover
names for any objects we picked up so we can generate name hash values
and hopefully get higher quality deltas as a result.

A future commit will change the purpose of this reachability traversal
to find and pack objects which are reachable from commits in the input
packs, but are packed in an unknown (not included nor excluded) pack.

Extract the code which initializes and performs the reachability
traversal to take place in the caller, not the callee, which prepares us
to share this code for the '--unpacked' case (see the function
add_unreachable_loose_objects() for more details).

Signed-off-by: Taylor Blau <me@ttaylorr.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
builtin/pack-objects.c