commit.c: migrate the commit buffer to the parsed object store
[gitweb.git] / object.c
index 9d74de95f5bde0785f1173b036d837a371936dd9..9d588448192d177997b1806a2e588e0244719e6f 100644 (file)
--- a/object.c
+++ b/object.c
@@ -467,6 +467,8 @@ struct parsed_object_pool *parsed_object_pool_new(void)
        o->is_shallow = -1;
        o->shallow_stat = xcalloc(1, sizeof(*o->shallow_stat));
 
+       o->buffer_slab = allocate_commit_buffer_slab();
+
        return o;
 }
 
@@ -541,6 +543,9 @@ void parsed_object_pool_clear(struct parsed_object_pool *o)
        FREE_AND_NULL(o->obj_hash);
        o->obj_hash_size = 0;
 
+       free_commit_buffer_slab(o->buffer_slab);
+       o->buffer_slab = NULL;
+
        clear_alloc_state(o->blob_state);
        clear_alloc_state(o->tree_state);
        clear_alloc_state(o->commit_state);