Skip to content

Commit ba43964

Browse files
bmwillgitster
authored andcommitted
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 <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent 3f13877 commit ba43964

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

repository.c

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,9 @@
44
#include "submodule-config.h"
55

66
/* 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+
};
810
struct repository *the_repository = &the_repo;
911

1012
static char *git_path_from_env(const char *envvar, const char *git_dir,

0 commit comments

Comments
 (0)