]> Kevux Git Server - rit/commit
odb: introduce `struct odb_for_each_object_options`
authorPatrick Steinhardt <ps@pks.im>
Fri, 20 Mar 2026 07:07:29 +0000 (08:07 +0100)
committerJunio C Hamano <gitster@pobox.com>
Fri, 20 Mar 2026 20:16:41 +0000 (13:16 -0700)
commitcfd575f0a9730712107e4ee6799a37665bcd8204
treef52a43e428ac45cb952a3965f8855eb997a2d3df
parentfe446b01aeaab307adcbfb39d4aaa72c37afbcda
odb: introduce `struct odb_for_each_object_options`

The `odb_for_each_object()` function only accepts a bitset of flags. In
a subsequent commit we'll want to change object iteration to also
support iterating over only those objects that have a specific prefix.
While we could of course add the prefix to the function signature, or
alternatively introduce a new function, both of these options don't
really seem to be that sensible.

Instead, introduce a new `struct odb_for_each_object_options` that can
be passed to a new `odb_for_each_object_ext()` function. Splice through
the options structure into the respective object database sources.

Signed-off-by: Patrick Steinhardt <ps@pks.im>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
builtin/cat-file.c
builtin/pack-objects.c
commit-graph.c
object-file.c
object-file.h
odb.c
odb.h
odb/source-files.c
odb/source.h
packfile.c
packfile.h