repository: have the_repository use the_index
authorBrandon Williams <bmwill@google.com>
Tue, 18 Jul 2017 19:05:19 +0000 (12:05 -0700)
committerJunio C Hamano <gitster@pobox.com>
Tue, 18 Jul 2017 20:32:25 +0000 (13:32 -0700)
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>
repository.c
index 8e60af1d5f279741b3e2df99871cbcc16bd55667..c0e0e0e7e76015e3f93b21528bff58286fab0fb2 100644 (file)
@@ -4,7 +4,9 @@
 #include "submodule-config.h"
 
 /* The main repository */
-static struct repository the_repo;
+static struct repository the_repo = {
+       NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, &the_index, 0, 0
+};
 struct repository *the_repository = &the_repo;
 
 static char *git_path_from_env(const char *envvar, const char *git_dir,