diff options
| author | Patrick Steinhardt <ps@pks.im> | 2025-11-03 08:42:00 +0100 |
|---|---|---|
| committer | Junio C Hamano <gitster@pobox.com> | 2025-11-03 12:18:46 -0800 |
| commit | ece43d9dc70b1717484ee78b66aef4f9390c2b2b (patch) | |
| tree | 614ea40a974968ea8ddd66da95edf7575295973c /odb.c | |
| parent | 0cc12dedef2885dba8cf2635697767d394baf91f (diff) | |
| download | git-ece43d9dc70b1717484ee78b66aef4f9390c2b2b.tar.gz | |
object-file: introduce `struct odb_source_loose`
Currently, all state that relates to loose objects is held directly by
the `struct odb_source`. Introduce a new `struct odb_source_loose` to
hold the state instead so that it is entirely self-contained.
This structure will eventually morph into the backend for accessing
loose objects. As such, this is part of the refactorings to introduce
pluggable object databases.
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 | 2 |
1 files changed, 2 insertions, 0 deletions
@@ -151,6 +151,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); return source; } @@ -368,6 +369,7 @@ struct odb_source *odb_set_temporary_primary_source(struct object_database *odb, static void odb_source_free(struct odb_source *source) { free(source->path); + odb_source_loose_free(source->loose); odb_clear_loose_cache(source); loose_object_map_clear(&source->loose_map); free(source); |
