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: Nguyễn Thái Ngọc Duy <pclouds@xxxxxxxxx> --- read-cache.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/read-cache.c b/read-cache.c index 5e8c06c..c0c2e39 100644 --- a/read-cache.c +++ b/read-cache.c @@ -510,6 +510,8 @@ void remove_marked_cache_entries(struct index_state *istate) else ce_array[j++] = ce_array[i]; } + if (j == istate->cache_nr) + return; istate->cache_changed = 1; istate->cache_nr = j; } -- 1.9.1.346.ga2b5940 -- To unsubscribe from this list: send the line "unsubscribe git" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html