Adithya Chakilam, of NVIDIA, posted a two-patch series for git repack. His motivation is external key-value object stores that manage and retrieve Git objects individually. The existing --filter-to option writes filtered-out objects into packs, so using them with such stores requires an extra unpacking step.
The first patch adds --filter-to-loose=<dir>. Repack streams the filtered pack into unpack-objects instead of writing an intermediate pack file, and treats the destination as a Git object directory. His example is git repack -a --filter=blob=1m --filter-to-loose=/path/to/objects.
The first patch's limitation is that the filtered pack is built with --stdin-packs, so only objects already in packs are handled. Loose objects excluded by the filter stay in the source repository, and the destination does not get the full set of filtered-out objects.
The second patch copies such loose objects to the destination too. An object already present in the destination is not rewritten, and with -d the source copies are removed once everything is written.
The excerpts show no review comments yet.