From: Derrick Stolee Date: Thu, 1 Apr 2021 01:49:55 +0000 (+0000) Subject: entry: ensure full index X-Git-Tag: v2.32.0-rc0~59^2~8 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=3450a304aaa20707a696176441a8bbfe6d5431a3;p=thirdparty%2Fgit.git entry: ensure full index Before iterating over all cache entries, ensure that a sparse index is expanded to a full index to avoid unexpected behavior. Signed-off-by: Derrick Stolee Reviewed-by: Elijah Newren Signed-off-by: Junio C Hamano --- diff --git a/entry.c b/entry.c index 7b9f43716f..891e4ba2b4 100644 --- a/entry.c +++ b/entry.c @@ -412,6 +412,8 @@ static void mark_colliding_entries(const struct checkout *state, ce->ce_flags |= CE_MATCHED; + /* TODO: audit for interaction with sparse-index. */ + ensure_full_index(state->istate); for (i = 0; i < state->istate->cache_nr; i++) { struct cache_entry *dup = state->istate->cache[i];