diff options
| author | Patrick Steinhardt <ps@pks.im> | 2026-03-05 15:19:41 +0100 |
|---|---|---|
| committer | Junio C Hamano <gitster@pobox.com> | 2026-03-05 11:45:14 -0800 |
| commit | ba1c21d34346e5979f9308806274bfcda4949ad4 (patch) | |
| tree | 6168a797016f662df19ed08117011e9bac081af2 /odb.c | |
| parent | b1af291b4adf1c433ad2b79f0390f7d6b516a964 (diff) | |
| download | git-ba1c21d34346e5979f9308806274bfcda4949ad4.tar.xz | |
odb: split `struct odb_source` into separate header
Subsequent commits will expand the `struct odb_source` to become a
generic interface for accessing an object database source. As part of
these refactorings we'll add a set of function pointers that will
significantly expand the structure overall.
Prepare for this by splitting out the `struct odb_source` into a
separate header. This keeps the high-level object database interface
detached from the low-level object database sources.
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 | 25 |
1 files changed, 0 insertions, 25 deletions
@@ -217,23 +217,6 @@ static void odb_source_read_alternates(struct odb_source *source, free(path); } - -static struct odb_source *odb_source_new(struct object_database *odb, - const char *path, - bool local) -{ - struct odb_source *source; - - CALLOC_ARRAY(source, 1); - source->odb = odb; - source->local = local; - source->path = xstrdup(path); - source->loose = odb_source_loose_new(source); - source->packfiles = packfile_store_new(source); - - return source; -} - static struct odb_source *odb_add_alternate_recursively(struct object_database *odb, const char *source, int depth) @@ -373,14 +356,6 @@ struct odb_source *odb_set_temporary_primary_source(struct object_database *odb, return source->next; } -static void odb_source_free(struct odb_source *source) -{ - free(source->path); - odb_source_loose_free(source->loose); - packfile_store_free(source->packfiles); - free(source); -} - void odb_restore_primary_source(struct object_database *odb, struct odb_source *restore_source, const char *old_path) |
