summaryrefslogtreecommitdiff
path: root/repository.c
diff options
context:
space:
mode:
authorBrandon Williams <bmwill@google.com>2017-07-18 12:05:19 -0700
committerJunio C Hamano <gitster@pobox.com>2017-07-18 13:32:25 -0700
commitba43964d47ac29eafafd8d475c299c51c8a1ca75 (patch)
treed77a6c3387d677a1cbb348350c8625b95d7e8016 /repository.c
parent3f13877595500bd54ee370167bc868f3c1eee5b7 (diff)
downloadgit-ba43964d47ac29eafafd8d475c299c51c8a1ca75.tar.gz
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>
Diffstat (limited to 'repository.c')
-rw-r--r--repository.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/repository.c b/repository.c
index 8e60af1d5f..c0e0e0e7e7 100644
--- a/repository.c
+++ b/repository.c
@@ -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,