summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--read-cache.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/read-cache.c b/read-cache.c
index 5e8c06cfd6..c0c2e39ced 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;
}