aboutsummaryrefslogtreecommitdiffstats
path: root/split-index.c
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2023-01-17 14:31:26 -0800
committerJunio C Hamano <gitster@pobox.com>2023-01-17 14:31:26 -0800
commit73f69f22e590c2ddc2c6fb678a5b11d9d0ba39fa (patch)
tree3009eb67c05e69ccb782d7234cda170e24a9c459 /split-index.c
parenta7caae2729742fc80147bca1c02ae848cb55921a (diff)
parent2f6b1eb794ee1f152c1a4b519e3b6dcecd0b487f (diff)
downloadgit-73f69f22e590c2ddc2c6fb678a5b11d9d0ba39fa.tar.gz
Merge branch 'ab/cache-api-cleanup' into ab/cache-api-cleanup-users
* ab/cache-api-cleanup: cache API: add a "INDEX_STATE_INIT" macro/function, add release_index() read-cache.c: refactor set_new_index_sparsity() for subsequent commit sparse-index API: BUG() out on NULL ensure_full_index() sparse-index.c: expand_to_path() can assume non-NULL "istate" builtin/difftool.c: { 0 }-initialize rather than using memset()
Diffstat (limited to 'split-index.c')
-rw-r--r--split-index.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/split-index.c b/split-index.c
index 9d0ccc30d0..a5b56c0c37 100644
--- a/split-index.c
+++ b/split-index.c
@@ -90,7 +90,8 @@ void move_cache_to_base_index(struct index_state *istate)
mem_pool_combine(istate->ce_mem_pool, istate->split_index->base->ce_mem_pool);
}
- CALLOC_ARRAY(si->base, 1);
+ ALLOC_ARRAY(si->base, 1);
+ index_state_init(si->base);
si->base->version = istate->version;
/* zero timestamp disables racy test in ce_write_index() */
si->base->timestamp = istate->timestamp;