From: Derrick Stolee <dstolee@xxxxxxxxxxxxx> 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 <dstolee@xxxxxxxxxxxxx> --- entry.c | 1 + 1 file changed, 1 insertion(+) diff --git a/entry.c b/entry.c index 7b9f43716f76..e55a2af867cf 100644 --- a/entry.c +++ b/entry.c @@ -412,6 +412,7 @@ static void mark_colliding_entries(const struct checkout *state, ce->ce_flags |= CE_MATCHED; + ensure_full_index(state->istate); for (i = 0; i < state->istate->cache_nr; i++) { struct cache_entry *dup = state->istate->cache[i]; -- gitgitgadget