Commit ad837d9e authored by Duy Nguyen's avatar Duy Nguyen Committed by Junio C Hamano

read-cache: be strict about "changed" in remove_marked_cache_entries()

remove_marked_cache_entries() deletes entries marked with
CE_REMOVE. But if there is no such entry, do not mark the index as
"changed" because that could trigger an index update unnecessarily.
Signed-off-by: Duy Nguyen's avatarNguyễn Thái Ngọc Duy <>
Signed-off-by: default avatarJunio C Hamano <>
parent ce51bf09
......@@ -510,6 +510,8 @@ void remove_marked_cache_entries(struct index_state *istate)
ce_array[j++] = ce_array[i];
if (j == istate->cache_nr)
istate->cache_changed = 1;
istate->cache_nr = j;
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment