diff options
Diffstat (limited to 'preload-index.c')
| -rw-r--r-- | preload-index.c | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/preload-index.c b/preload-index.c index 7926eb09a6..b222821b44 100644 --- a/preload-index.c +++ b/preload-index.c @@ -2,7 +2,7 @@ * Copyright (C) 2008 Linus Torvalds */ -#define USE_THE_REPOSITORY_VARIABLE +#define DISABLE_SIGN_COMPARE_WARNINGS #include "git-compat-util.h" #include "pathspec.h" @@ -18,6 +18,7 @@ #include "repository.h" #include "symlinks.h" #include "trace2.h" +#include "config.h" /* * Mostly randomly chosen maximum thread counts: we @@ -110,6 +111,9 @@ void preload_index(struct index_state *index, struct thread_data data[MAX_PARALLEL]; struct progress_data pd; int t2_sum_lstat = 0; + int core_preload_index = 1; + + repo_config_get_bool(index->repo, "core.preloadindex", &core_preload_index); if (!HAVE_THREADS || !core_preload_index) return; @@ -131,7 +135,9 @@ void preload_index(struct index_state *index, memset(&pd, 0, sizeof(pd)); if (refresh_flags & REFRESH_PROGRESS && isatty(2)) { - pd.progress = start_delayed_progress(_("Refreshing index"), index->cache_nr); + pd.progress = start_delayed_progress(index->repo, + _("Refreshing index"), + index->cache_nr); pthread_mutex_init(&pd.mutex, NULL); } |
