]> git.ipfire.org Git - thirdparty/git.git/commit
treewide: enumerate promisor objects via `odb_for_each_object()`
authorPatrick Steinhardt <ps@pks.im>
Thu, 15 Jan 2026 11:04:38 +0000 (12:04 +0100)
committerJunio C Hamano <gitster@pobox.com>
Thu, 15 Jan 2026 13:50:28 +0000 (05:50 -0800)
commit98f6927c6052b73a70d80780e17c86dc73c149a7
tree334383656eda83e841e5f2ff41bcf34b08f289e8
parent7305e6d60ed2a936b0c7f377e42a31cd28756043
treewide: enumerate promisor objects via `odb_for_each_object()`

We have multiple callsites where we enumerate all promisor objects in
the object database via `for_each_packed_object()`. This is done by
passing the `ODB_FOR_EACH_OBJECT_PROMISOR_ONLY` flag, which causes us to
skip over all non-promisor objects.

These callsites can be trivially converted to `odb_for_each_object()` as
we know to skip enumeration of loose objects in case the `PROMISOR_ONLY`
flag was passed by the caller.

Refactor the sites accordingly.

Signed-off-by: Patrick Steinhardt <ps@pks.im>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
packfile.c
repack-promisor.c
revision.c