From 451b66c533b9ede47951d16c0127ab33372125ca Mon Sep 17 00:00:00 2001 From: Johannes Schindelin Date: Wed, 19 Jan 2022 17:29:39 +0000 Subject: split-index: it really is incompatible with the sparse index ... at least for now. So let's error out if we are even trying to initialize the split index when the index is sparse, or when trying to write the split index extension for a sparse index. Signed-off-by: Johannes Schindelin Reviewed-by: Elijah Newren Signed-off-by: Junio C Hamano --- split-index.c | 3 +++ 1 file changed, 3 insertions(+) (limited to 'split-index.c') diff --git a/split-index.c b/split-index.c index 8e52e891c3..9d0ccc30d0 100644 --- a/split-index.c +++ b/split-index.c @@ -5,6 +5,9 @@ struct split_index *init_split_index(struct index_state *istate) { if (!istate->split_index) { + if (istate->sparse_index) + die(_("cannot use split index with a sparse index")); + CALLOC_ARRAY(istate->split_index, 1); istate->split_index->refcount = 1; } -- cgit v1.2.3