repository: have the_repository use the_index
Have the index state which is stored in 'the_repository' be a pointer to the in-core index 'the_index'. This makes it easier to begin transitioning more parts of the code base to operate on a 'struct repository'. Signed-off-by: Brandon Williams <bmwill@google.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Brandon Williams committed
Jul 18, 2017 at 12:05 UTC
ba43964d47ac29eafafd8d475c299c51c8a1ca75
1 file changed
+3
-1
repository.c
+3
-1
@@ -4,7 +4,9 @@
4
#include "submodule-config.h"
5
6
/* The main repository */
7
-static struct repository the_repo;
7
+static struct repository the_repo = {
8
+ NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, &the_index, 0, 0
9
+};
10
struct repository *the_repository = &the_repo;
11
12
static char *git_path_from_env(const char *envvar, const char *git_dir,