aboutsummaryrefslogtreecommitdiff
path: root/packfile.h
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2026-03-10 10:13:40 -0700
committerJunio C Hamano <gitster@pobox.com>2026-03-10 10:13:40 -0700
commit6cdef943d28fa7d6964ec570b33a0bff4c80ea8c (patch)
treea0e3158cc93a48d1b2c7c77747536f0bd39a0165 /packfile.h
parentd181b9354cf85b44455ce3ca9e6af0b9559e0ae2 (diff)
parentd6fc6fe6f8b74e663d6013f830b535f50bfc1414 (diff)
downloadgit-6cdef943d28fa7d6964ec570b33a0bff4c80ea8c.tar.xz
Merge branch 'ps/odb-sources' into ps/object-counting
* ps/odb-sources: odb/source: make `begin_transaction()` function pluggable odb/source: make `write_alternate()` function pluggable odb/source: make `read_alternates()` function pluggable odb/source: make `write_object_stream()` function pluggable odb/source: make `write_object()` function pluggable odb/source: make `freshen_object()` function pluggable odb/source: make `for_each_object()` function pluggable odb/source: make `read_object_stream()` function pluggable odb/source: make `read_object_info()` function pluggable odb/source: make `close()` function pluggable odb/source: make `reprepare()` function pluggable odb/source: make `free()` function pluggable odb/source: introduce source type for robustness odb: move reparenting logic into respective subsystems odb: embed base source in the "files" backend odb: introduce "files" source odb: split `struct odb_source` into separate header
Diffstat (limited to 'packfile.h')
-rw-r--r--packfile.h7
1 files changed, 5 insertions, 2 deletions
diff --git a/packfile.h b/packfile.h
index 85ce44f8ee..8b04a258a7 100644
--- a/packfile.h
+++ b/packfile.h
@@ -4,6 +4,7 @@
#include "list.h"
#include "object.h"
#include "odb.h"
+#include "odb/source-files.h"
#include "oidset.h"
#include "repository.h"
#include "strmap.h"
@@ -192,7 +193,8 @@ static inline struct repo_for_each_pack_data repo_for_eack_pack_data_init(struct
odb_prepare_alternates(repo->objects);
for (struct odb_source *source = repo->objects->sources; source; source = source->next) {
- struct packfile_list_entry *entry = packfile_store_get_packs(source->packfiles);
+ struct odb_source_files *files = odb_source_files_downcast(source);
+ struct packfile_list_entry *entry = packfile_store_get_packs(files->packed);
if (!entry)
continue;
data.source = source;
@@ -212,7 +214,8 @@ static inline void repo_for_each_pack_data_next(struct repo_for_each_pack_data *
return;
for (source = data->source->next; source; source = source->next) {
- struct packfile_list_entry *entry = packfile_store_get_packs(source->packfiles);
+ struct odb_source_files *files = odb_source_files_downcast(source);
+ struct packfile_list_entry *entry = packfile_store_get_packs(files->packed);
if (!entry)
continue;
data->source = source;