Git fork

preload-index: stop depending on 'the_repository'

Refactor "preload-index.c" to remove the dependency on the global
'the_repository'. Replace the occurrences of 'the_repository' with
'index->repo' and thus remove the definition '#define
USE_THE_REPOSITORY_VARIABLE'.

Mentored-by: Christian Couder <christian.couder@gmail.com>
Mentored-by: Ghanshyam Thakkar <shyamthakkar001@gmail.com>
Signed-off-by: Ayush Chandekar <ayu.chandekar@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

authored by

Ayush Chandekar and committed by
Junio C Hamano
1fde1c5d b1d47b46

+2 -3
+2 -3
preload-index.c
··· 2 2 * Copyright (C) 2008 Linus Torvalds 3 3 */ 4 4 5 - #define USE_THE_REPOSITORY_VARIABLE 6 5 #define DISABLE_SIGN_COMPARE_WARNINGS 7 6 8 7 #include "git-compat-util.h" ··· 114 113 int t2_sum_lstat = 0; 115 114 int core_preload_index = 1; 116 115 117 - repo_config_get_bool(the_repository, "core.preloadindex", &core_preload_index); 116 + repo_config_get_bool(index->repo, "core.preloadindex", &core_preload_index); 118 117 119 118 if (!HAVE_THREADS || !core_preload_index) 120 119 return; ··· 136 135 137 136 memset(&pd, 0, sizeof(pd)); 138 137 if (refresh_flags & REFRESH_PROGRESS && isatty(2)) { 139 - pd.progress = start_delayed_progress(the_repository, 138 + pd.progress = start_delayed_progress(index->repo, 140 139 _("Refreshing index"), 141 140 index->cache_nr); 142 141 pthread_mutex_init(&pd.mutex, NULL);