Files
git/builtin
Taylor Blau ec0165a0cd pack-objects: introduce '--stdin-packs=follow-reachable'
Introduce a new '--stdin-packs=follow-reachable' mode. Like
'--stdin-packs=follow', this mode recognizes the '!' (excluded-open)
pack prefix and halts at '^' (excluded-closed) packs.

Unlike 'follow', which eagerly includes all objects from listed packs
and then walks reachability to rescue additional objects, the new
'follow-reachable' mode uses reference tips as its traversal starting
points and only includes objects that are both reachable AND belong to
an included pack (or are reachable from a commit or tag in one):

 - Objects in included packs: added to the output if reachable.

 - Objects reachable from included-pack commits but in unknown packs:
   added to the output (rescued).

 - Objects in excluded-open ('!') packs: not included, but the traversal
   continues through them.

 - Objects in excluded-closed ('^') packs: not included, and the
   traversal halts.

The implementation uses a two-phase approach:

 1. In the first phase, commits and tags in included packs (and loose,
    when --unpacked is given) are marked with a flag bit
    (IN_INCLUDED_PACK). A commit-only walk from ref tips then identifies
    which marked objects are reachable, halting at excluded-closed
    packs.

 2. In the second phase, every reachable marked object (from the
    previous step) becomes a tip for a full object traversal whose
    `show_object_pack_hint()` and `show_commit_pack_hint()` callbacks
    add discovered objects (obeying the usual constraints imposed by
    `want_object_in_pack()`).

When '--unpacked' is given, reachable loose objects are included in the
output while unreachable loose objects are left alone. This is achieved
by marking loose commits and tags with IN_INCLUDED_PACK during the first
phase, so the pre-walk discovers them naturally.

Signed-off-by: Taylor Blau <me@ttaylorr.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2026-06-26 14:54:55 -07:00
..
2026-04-10 07:58:53 -07:00
2026-06-09 10:04:50 +09:00
2026-06-09 10:04:50 +09:00
2026-06-07 23:58:24 +09:00
2026-05-27 14:15:44 +09:00
2026-06-15 07:42:00 -07:00
2026-05-04 10:11:17 +09:00
2026-03-23 08:33:10 -07:00
2026-03-31 20:43:14 -07:00
2026-02-20 08:13:58 -08:00
2026-03-31 20:43:14 -07:00
2026-05-06 09:48:28 +09:00
2026-04-10 07:58:53 -07:00