]> Kevux Git Server - rit/commit
treewide: drop uses of `for_each_{loose,packed}_object()`
authorPatrick Steinhardt <ps@pks.im>
Mon, 26 Jan 2026 09:51:26 +0000 (10:51 +0100)
committerJunio C Hamano <gitster@pobox.com>
Mon, 26 Jan 2026 16:26:07 +0000 (08:26 -0800)
commit317ea9a6c3c134a1bcdee49bbbbf1731c17b967a
treed64034f71e3773f95825eb384be5b8c608c87ca1
parent2813c97310a998510ad4bcbbf38a774fd6bb5386
treewide: drop uses of `for_each_{loose,packed}_object()`

We're using `for_each_loose_object()` and `for_each_packed_object()` at
a couple of callsites to enumerate all loose and packed objects,
respectively. These functions will be removed in a subsequent commit in
favor of the newly introduced `odb_source_loose_for_each_object()` and
`packfile_store_for_each_object()` replacements.

Prepare for this by refactoring the sites accordingly.

Note that ideally, we'd convert all callsites to use the generic
`odb_for_each_object()` function already. But for some callers this is
not possible (yet), and it would require some significant refactorings
to make this work. Converting these site will thus be deferred to a
later patch series.

Signed-off-by: Patrick Steinhardt <ps@pks.im>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
builtin/cat-file.c
commit-graph.c