From d0b59866223f7ef0dcd07bff857f651cd921bc02 Mon Sep 17 00:00:00 2001 From: Stefan Beller Date: Fri, 23 Mar 2018 18:21:00 +0100 Subject: object-store: close all packs upon clearing the object store MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Stefan Beller Signed-off-by: Junio C Hamano Signed-off-by: Nguyễn Thái Ngọc Duy Signed-off-by: Junio C Hamano --- object.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) (limited to 'object.c') diff --git a/object.c b/object.c index 04631ee841..4c2cf7ff5d 100644 --- a/object.c +++ b/object.c @@ -5,6 +5,7 @@ #include "commit.h" #include "tag.h" #include "object-store.h" +#include "packfile.h" static struct object **obj_hash; static int nr_objs, obj_hash_size; @@ -483,8 +484,6 @@ void raw_object_store_clear(struct raw_object_store *o) o->alt_odb_tail = NULL; INIT_LIST_HEAD(&o->packed_git_mru); - /* - * TODO: call close_all_packs once migrated to - * take an object store argument - */ + close_all_packs(o); + o->packed_git = NULL; } -- cgit v1.2.3