diff options
Diffstat (limited to 'read-cache.c')
-rw-r--r-- | read-cache.c | 19 |
1 files changed, 9 insertions, 10 deletions
diff --git a/read-cache.c b/read-cache.c index 59dbebc15d..7a07286164 100644 --- a/read-cache.c +++ b/read-cache.c @@ -1845,18 +1845,17 @@ static void check_ce_order(struct index_state *istate) static void tweak_untracked_cache(struct index_state *istate) { - switch (git_config_get_untracked_cache()) { - case -1: /* keep: do nothing */ - break; - case 0: /* false */ + struct repository *r = the_repository; + + prepare_repo_settings(r); + + if (r->settings.core_untracked_cache == UNTRACKED_CACHE_REMOVE) { remove_untracked_cache(istate); - break; - case 1: /* true */ - add_untracked_cache(istate); - break; - default: /* unknown value: do nothing */ - break; + return; } + + if (r->settings.core_untracked_cache == UNTRACKED_CACHE_WRITE) + add_untracked_cache(istate); } static void tweak_split_index(struct index_state *istate) |