aboutsummaryrefslogtreecommitdiffstats
path: root/object.c
diff options
context:
space:
mode:
Diffstat (limited to 'object.c')
-rw-r--r--object.c67
1 files changed, 0 insertions, 67 deletions
diff --git a/object.c b/object.c
index 154525a497..ccda798b75 100644
--- a/object.c
+++ b/object.c
@@ -6,16 +6,13 @@
#include "object.h"
#include "replace-object.h"
#include "object-file.h"
-#include "object-store.h"
#include "blob.h"
#include "statinfo.h"
#include "tree.h"
#include "commit.h"
#include "tag.h"
#include "alloc.h"
-#include "packfile.h"
#include "commit-graph.h"
-#include "loose.h"
unsigned int get_max_object_index(const struct repository *repo)
{
@@ -567,70 +564,6 @@ struct parsed_object_pool *parsed_object_pool_new(struct repository *repo)
return o;
}
-struct raw_object_store *raw_object_store_new(void)
-{
- struct raw_object_store *o = xmalloc(sizeof(*o));
-
- memset(o, 0, sizeof(*o));
- INIT_LIST_HEAD(&o->packed_git_mru);
- hashmap_init(&o->pack_map, pack_map_entry_cmp, NULL, 0);
- pthread_mutex_init(&o->replace_mutex, NULL);
- return o;
-}
-
-void free_object_directory(struct object_directory *odb)
-{
- free(odb->path);
- odb_clear_loose_cache(odb);
- loose_object_map_clear(&odb->loose_map);
- free(odb);
-}
-
-static void free_object_directories(struct raw_object_store *o)
-{
- while (o->odb) {
- struct object_directory *next;
-
- next = o->odb->next;
- free_object_directory(o->odb);
- o->odb = next;
- }
- kh_destroy_odb_path_map(o->odb_by_path);
- o->odb_by_path = NULL;
-}
-
-void raw_object_store_clear(struct raw_object_store *o)
-{
- FREE_AND_NULL(o->alternate_db);
-
- oidmap_free(o->replace_map, 1);
- FREE_AND_NULL(o->replace_map);
- pthread_mutex_destroy(&o->replace_mutex);
-
- free_commit_graph(o->commit_graph);
- o->commit_graph = NULL;
- o->commit_graph_attempted = 0;
-
- free_object_directories(o);
- o->odb_tail = NULL;
- o->loaded_alternates = 0;
-
- INIT_LIST_HEAD(&o->packed_git_mru);
- close_object_store(o);
-
- /*
- * `close_object_store()` only closes the packfiles, but doesn't free
- * them. We thus have to do this manually.
- */
- for (struct packed_git *p = o->packed_git, *next; p; p = next) {
- next = p->next;
- free(p);
- }
- o->packed_git = NULL;
-
- hashmap_clear(&o->pack_map);
-}
-
void parsed_object_pool_reset_commit_grafts(struct parsed_object_pool *o)
{
for (int i = 0; i < o->grafts_nr; i++) {