aboutsummaryrefslogtreecommitdiff
path: root/odb.c
diff options
context:
space:
mode:
authorPatrick Steinhardt <ps@pks.im>2026-03-05 15:19:47 +0100
committerJunio C Hamano <gitster@pobox.com>2026-03-05 11:45:15 -0800
commit05151cf3602d5ebaaa4e04c415e8481cb1c7ddf6 (patch)
tree4e0ce63042fcf7d3a01660d66ca88a44ca8d57c9 /odb.c
parent47b965079ddd9ced04810d0a8738a1ca94f02268 (diff)
downloadgit-05151cf3602d5ebaaa4e04c415e8481cb1c7ddf6.tar.xz
odb/source: make `reprepare()` 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.c7
1 files changed, 2 insertions, 5 deletions
diff --git a/odb.c b/odb.c
index 86f7cf70a8..2cf6a53dc3 100644
--- a/odb.c
+++ b/odb.c
@@ -1119,11 +1119,8 @@ void odb_reprepare(struct object_database *o)
o->loaded_alternates = 0;
odb_prepare_alternates(o);
- for (source = o->sources; source; source = source->next) {
- struct odb_source_files *files = odb_source_files_downcast(source);
- odb_source_loose_reprepare(source);
- packfile_store_reprepare(files->packed);
- }
+ for (source = o->sources; source; source = source->next)
+ odb_source_reprepare(source);
o->approximate_object_count_valid = 0;