untracked-cache: temporarily disable with $GIT_DISABLE_UNTRACKED_CACHE

This can be used to double check if results with untracked cache are
correctly, compared to vanilla version. Untracked cache remains in
index, but not used.

Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
This commit is contained in:
Nguyễn Thái Ngọc Duy 2015-03-08 17:12:40 +07:00 committed by Junio C Hamano
parent 1bbb3dba3f
commit 76e6b090a0

2
dir.c
View File

@ -1801,7 +1801,7 @@ static struct untracked_cache_dir *validate_untracked_cache(struct dir_struct *d
struct untracked_cache_dir *root;
int i;
if (!dir->untracked)
if (!dir->untracked || getenv("GIT_DISABLE_UNTRACKED_CACHE"))
return NULL;
/*