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>
Nguyễn Thái Ngọc Duy committed
Mar 8, 2015 at 17:12 UTC
76e6b090a0b9b1e83b8e467d1b64f250f66c3f54
1 file changed
+1
-1
dir.c
+1
-1
@@ -1801,7 +1801,7 @@ static struct untracked_cache_dir *validate_untracked_cache(struct dir_struct *d
1801
struct untracked_cache_dir *root;
1802
int i;
1803
1804
- if (!dir->untracked)
1804
+ if (!dir->untracked || getenv("GIT_DISABLE_UNTRACKED_CACHE"))
1805
return NULL;
1806
1807
/*