| 2917 | } |
| 2918 | |
| 2919 | static unsigned new_untracked_cache_flags(struct index_state *istate) |
| 2920 | { |
| 2921 | struct repository *repo = istate->repo; |
| 2922 | const char *val; |
| 2923 | |
| 2924 | /* |
| 2925 | * This logic is coordinated with the setting of these flags in |
| 2926 | * wt-status.c#wt_status_collect_untracked(), and the evaluation |
| 2927 | * of the config setting in commit.c#git_status_config() |
| 2928 | */ |
| 2929 | if (!repo_config_get_string_tmp(repo, "status.showuntrackedfiles", &val) && |
| 2930 | !strcmp(val, "all")) |
| 2931 | return 0; |
| 2932 | |
| 2933 | /* |
| 2934 | * The default, if "all" is not set, is "normal" - leading us here. |
| 2935 | * If the value is "none" then it really doesn't matter. |
| 2936 | */ |
| 2937 | return DIR_SHOW_OTHER_DIRECTORIES | DIR_HIDE_EMPTY_DIRECTORIES; |
| 2938 | } |
| 2939 | |
| 2940 | static void new_untracked_cache(struct index_state *istate, int flags) |
| 2941 | { |
no test coverage detected