diff options
author | Derrick Stolee <dstolee@microsoft.com> | 2021-04-01 03:49:55 +0200 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2021-04-14 22:47:35 +0200 |
commit | 3450a304aaa20707a696176441a8bbfe6d5431a3 (patch) | |
tree | 4bb042e653a1f4ce83e7132d96efe865abf35c44 /entry.c | |
parent | dir: ensure full index (diff) | |
download | git-3450a304aaa20707a696176441a8bbfe6d5431a3.tar.xz git-3450a304aaa20707a696176441a8bbfe6d5431a3.zip |
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 <dstolee@microsoft.com>
Reviewed-by: Elijah Newren <newren@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'entry.c')
-rw-r--r-- | entry.c | 2 |
1 files changed, 2 insertions, 0 deletions
@@ -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]; |