diff options
Diffstat (limited to 'split-index.c')
-rw-r--r-- | split-index.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/split-index.c b/split-index.c index 120c8190b1..cfbc773e6c 100644 --- a/split-index.c +++ b/split-index.c @@ -97,7 +97,11 @@ void move_cache_to_base_index(struct index_state *istate) mem_pool_combine(istate->ce_mem_pool, istate->split_index->base->ce_mem_pool); } - ALLOC_ARRAY(si->base, 1); + if (si->base) + release_index(si->base); + else + ALLOC_ARRAY(si->base, 1); + index_state_init(si->base, istate->repo); si->base->version = istate->version; /* zero timestamp disables racy test in ce_write_index() */ |