read-cache: mark updated entries for split index

The large part of this patch just follows CE_ENTRY_CHANGED
marks. replace_index_entry() is updated to update
split_index->base->cache[] as well so base->cache[] does not reference
to a freed entry.

Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
This commit is contained in:
Nguyễn Thái Ngọc Duy
2014-06-13 19:19:39 +07:00
committed by Junio C Hamano
parent 045113a53e
commit 078a58e825
7 changed files with 30 additions and 2 deletions

View File

@ -214,6 +214,7 @@ finish:
if (!fstat_done)
lstat(ce->name, &st);
fill_stat_cache_info(ce, &st);
ce->ce_flags |= CE_UPDATE_IN_BASE;
state->istate->cache_changed |= CE_ENTRY_CHANGED;
}
return 0;