diff options
| author | Patrick Steinhardt <ps@pks.im> | 2026-03-05 15:19:42 +0100 |
|---|---|---|
| committer | Junio C Hamano <gitster@pobox.com> | 2026-03-05 11:45:14 -0800 |
| commit | cb506a8a69c953f7b87bb3ae099e0bed8218d3ab (patch) | |
| tree | 2b469f6c020f5fc1889a01754ed99443085eeb61 /odb/source.c | |
| parent | ba1c21d34346e5979f9308806274bfcda4949ad4 (diff) | |
| download | git-cb506a8a69c953f7b87bb3ae099e0bed8218d3ab.tar.xz | |
odb: introduce "files" source
Introduce a new "files" object database source. This source encapsulates
access to both loose object files and the packfile store, similar to how
the "files" backend for refs encapsulates access to loose refs and the
packed-refs file.
Note that for now the "files" source is still a direct member of a
`struct odb_source`. This architecture will be reversed in the next
commit so that the files source contains a `struct odb_source`.
Signed-off-by: Patrick Steinhardt <ps@pks.im>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'odb/source.c')
| -rw-r--r-- | odb/source.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/odb/source.c b/odb/source.c index 7fc89806f9..9d7fd19f45 100644 --- a/odb/source.c +++ b/odb/source.c @@ -13,8 +13,7 @@ struct odb_source *odb_source_new(struct object_database *odb, source->odb = odb; source->local = local; source->path = xstrdup(path); - source->loose = odb_source_loose_new(source); - source->packfiles = packfile_store_new(source); + source->files = odb_source_files_new(source); return source; } @@ -22,7 +21,6 @@ struct odb_source *odb_source_new(struct object_database *odb, void odb_source_free(struct odb_source *source) { free(source->path); - odb_source_loose_free(source->loose); - packfile_store_free(source->packfiles); + odb_source_files_free(source->files); free(source); } |
