diff options
| author | Patrick Steinhardt <ps@pks.im> | 2026-03-05 15:19:51 +0100 |
|---|---|---|
| committer | Junio C Hamano <gitster@pobox.com> | 2026-03-05 11:45:16 -0800 |
| commit | fdefdc2e6979e9e8cb28b34c458f42b44f217bf0 (patch) | |
| tree | 1a0f9e53968bc428519b7d907c2069c7f0437337 /odb.c | |
| parent | 1f3fd68e065b0f44432dc78c1b6f6e636929363e (diff) | |
| download | git-fdefdc2e6979e9e8cb28b34c458f42b44f217bf0.tar.xz | |
odb/source: make `for_each_object()` function pluggable
Introduce a new callback function in `struct odb_source` to make the
function pluggable.
Signed-off-by: Patrick Steinhardt <ps@pks.im>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'odb.c')
| -rw-r--r-- | odb.c | 12 |
1 files changed, 1 insertions, 11 deletions
@@ -984,20 +984,10 @@ int odb_for_each_object(struct object_database *odb, odb_prepare_alternates(odb); for (struct odb_source *source = odb->sources; source; source = source->next) { - struct odb_source_files *files = odb_source_files_downcast(source); - if (flags & ODB_FOR_EACH_OBJECT_LOCAL_ONLY && !source->local) continue; - if (!(flags & ODB_FOR_EACH_OBJECT_PROMISOR_ONLY)) { - ret = odb_source_loose_for_each_object(source, request, - cb, cb_data, flags); - if (ret) - return ret; - } - - ret = packfile_store_for_each_object(files->packed, request, - cb, cb_data, flags); + ret = odb_source_for_each_object(source, request, cb, cb_data, flags); if (ret) return ret; } |
