Skip to content

Commit 80f7f61

Browse files
committed
Merge branch 'ds/core-untracked-cache-config'
Setting core.untrackedCache to true failed to add the untracked cache extension to the index. * ds/core-untracked-cache-config: dir: force untracked cache with core.untrackedCache
2 parents 362f869 + 26b8946 commit 80f7f61

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

dir.c

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2936,7 +2936,9 @@ int read_directory(struct dir_struct *dir, struct index_state *istate,
29362936

29372937
if (force_untracked_cache < 0)
29382938
force_untracked_cache =
2939-
git_env_bool("GIT_FORCE_UNTRACKED_CACHE", 0);
2939+
git_env_bool("GIT_FORCE_UNTRACKED_CACHE", -1);
2940+
if (force_untracked_cache < 0)
2941+
force_untracked_cache = (istate->repo->settings.core_untracked_cache == UNTRACKED_CACHE_WRITE);
29402942
if (force_untracked_cache &&
29412943
dir->untracked == istate->untracked &&
29422944
(dir->untracked->dir_opened ||

0 commit comments

Comments
 (0)