read-cache: add invalidate parameter to remove_marked_cache_entries
When marking cache entries for removal, and later removing them all at once using 'remove_marked_cache_entries()', cache entries currently have to be invalidated manually in the cache tree and in the untracked cache. Add an invalidate flag to the function. With the flag set, the function will take care of invalidating the path in the cache tree and in the untracked cache. Note that the current callsites already do the invalidation properly in other places, so we're just passing 0 from there to keep the status quo. This will be useful in a subsequent commit. Signed-off-by: Thomas Gummerer <t.gummerer@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
This commit is contained in:

committed by
Junio C Hamano

parent
536ec1839d
commit
6fdc205722
@ -162,7 +162,7 @@ void merge_base_index(struct index_state *istate)
|
||||
ewah_each_bit(si->replace_bitmap, replace_entry, istate);
|
||||
ewah_each_bit(si->delete_bitmap, mark_entry_for_delete, istate);
|
||||
if (si->nr_deletions)
|
||||
remove_marked_cache_entries(istate);
|
||||
remove_marked_cache_entries(istate, 0);
|
||||
|
||||
for (i = si->nr_replacements; i < si->saved_cache_nr; i++) {
|
||||
if (!ce_namelen(si->saved_cache[i]))
|
||||
|
Reference in New Issue
Block a user