commit.c: migrate the commit buffer to the parsed object store

Signed-off-by: Stefan Beller <sbeller@google.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
This commit is contained in:
Stefan Beller
2018-06-28 18:22:15 -07:00
committed by Junio C Hamano
parent 95bb9d4c32
commit 65ea9d4bec
4 changed files with 36 additions and 6 deletions

View File

@ -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);