diff options
| author | Patrick Steinhardt <ps@pks.im> | 2026-03-05 15:19:52 +0100 |
|---|---|---|
| committer | Junio C Hamano <gitster@pobox.com> | 2026-03-05 11:45:16 -0800 |
| commit | 6a38b13fbac73d1a1982f9211c5c3e64e1191696 (patch) | |
| tree | 5476c9e8b1b91e9189384d434676ea906be52d8e /odb.c | |
| parent | fdefdc2e6979e9e8cb28b34c458f42b44f217bf0 (diff) | |
| download | git-6a38b13fbac73d1a1982f9211c5c3e64e1191696.tar.xz | |
odb/source: make `freshen_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, 2 insertions, 10 deletions
@@ -959,18 +959,10 @@ int odb_freshen_object(struct object_database *odb, const struct object_id *oid) { struct odb_source *source; - odb_prepare_alternates(odb); - for (source = odb->sources; source; source = source->next) { - struct odb_source_files *files = odb_source_files_downcast(source); - - if (packfile_store_freshen_object(files->packed, oid)) + for (source = odb->sources; source; source = source->next) + if (odb_source_freshen_object(source, oid)) return 1; - - if (odb_source_loose_freshen_object(source, oid)) - return 1; - } - return 0; } |
