diff options
author | Thomas Gummerer <t.gummerer@gmail.com> | 2018-12-20 13:48:16 +0000 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2019-01-02 15:28:05 -0800 |
commit | 6fdc2057225ad1ae735ecaacdcace77c8b0b6b76 (patch) | |
tree | d40292266321be1a88645a3f8c9c091836ed129f /unpack-trees.c | |
parent | 536ec1839dbde8b9a6b38e6ccb5ab01b2b6311f9 (diff) | |
download | git-6fdc2057225ad1ae735ecaacdcace77c8b0b6b76.tar.gz |
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>
Diffstat (limited to 'unpack-trees.c')
-rw-r--r-- | unpack-trees.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/unpack-trees.c b/unpack-trees.c index e8d1a6ac50..8e6afa924d 100644 --- a/unpack-trees.c +++ b/unpack-trees.c @@ -392,7 +392,7 @@ static int check_updates(struct unpack_trees_options *o) unlink_entry(ce); } } - remove_marked_cache_entries(index); + remove_marked_cache_entries(index, 0); remove_scheduled_dirs(); if (should_update_submodules() && o->update && !o->dry_run) |