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>
This commit is contained in:
committed by
Junio C Hamano
parent
4a4ca4796d
commit
07b29bfd8d
9
dir.c
9
dir.c
@ -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)
|
||||
|
||||
Reference in New Issue
Block a user