diff options
author | Christian Couder <christian.couder@gmail.com> | 2016-01-24 16:28:20 +0100 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2016-01-25 12:40:11 -0800 |
commit | 07b29bfd8d3de9a16c1c93e285b6980ca6b77b45 (patch) | |
tree | e63f874f30994dc539b63f0e680cc4c03080b963 /dir.c | |
parent | dir: add {new,add}_untracked_cache() (diff) | |
download | tgif-07b29bfd8d3de9a16c1c93e285b6980ca6b77b45.tar.xz |
dir: add remove_untracked_cache()
Factor out code into remove_untracked_cache(), which will be used
in a later commit.
Signed-off-by: Christian Couder <chriscool@tuxfamily.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'dir.c')
-rw-r--r-- | dir.c | 9 |
1 files changed, 9 insertions, 0 deletions
@@ -1956,6 +1956,15 @@ void add_untracked_cache(struct index_state *istate) istate->cache_changed |= UNTRACKED_CHANGED; } +void remove_untracked_cache(struct index_state *istate) +{ + if (istate->untracked) { + free_untracked_cache(istate->untracked); + istate->untracked = NULL; + istate->cache_changed |= UNTRACKED_CHANGED; + } +} + static struct untracked_cache_dir *validate_untracked_cache(struct dir_struct *dir, int base_len, const struct pathspec *pathspec) |