]> git.ipfire.org Git - thirdparty/git.git/commit - dir.c
untracked cache: invalidate at index addition or removal
authorNguyễn Thái Ngọc Duy <pclouds@gmail.com>
Sun, 8 Mar 2015 10:12:35 +0000 (17:12 +0700)
committerJunio C Hamano <gitster@pobox.com>
Thu, 12 Mar 2015 20:45:16 +0000 (13:45 -0700)
commite931371a8f1164185486a1f5fdaaa708b4a6217c
tree54a324f4d02e1f14d9715029d652a742de48ba5c
parentf9e6c649589e0940ccb82821107fb658277ed86b
untracked cache: invalidate at index addition or removal

Ideally we should implement untracked_cache_remove_from_index() and
untracked_cache_add_to_index() so that they update untracked cache
right away instead of invalidating it and wait for read_directory()
next time to deal with it. But that may need some more work in
unpack-trees.c. So stay simple as the first step.

The new call in add_index_entry_with_check() may look strange because
new calls usually stay close to cache_tree_invalidate_path(). We do it
a bit later than c_t_i_p() in this function because if it's about
replacing the entry with the same name, we don't care (but cache-tree
does).

Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
dir.c
dir.h
read-cache.c
unpack-trees.c