@@ -2,7 +2,7 @@
* not really _using_ the compat macros, just make sure the_index
* declaration matches the definition in this file.
*/
-#define USE_THE_INDEX_VARIABLE
+
#include "git-compat-util.h"
#include "abspath.h"
#include "repository.h"
@@ -23,7 +23,7 @@
/* The main repository */
static struct repository the_repo;
struct repository *the_repository;
-struct index_state the_index;
+static struct index_state the_index;
static void initialize_repository(struct repository *repo,
struct index_state *index)
@@ -187,9 +187,6 @@ struct repository {
};
extern struct repository *the_repository;
-#ifdef USE_THE_INDEX_VARIABLE
-extern struct index_state the_index;
-#endif
/*
* Define a custom repository layout. Any field can be NULL, which
All users of `the_index` have been converted to use either a custom `struct index_state *` or the index provided by `the_repository`. We can thus drop the globally-accessible declaration of this variable. This concludes the quest to make Git `the_index` free, which has started with 4aab5b46f4 (Make read-cache.c "the_index" free., 2007-04-01). Signed-off-by: Patrick Steinhardt <ps@pks.im> --- repository.c | 4 ++-- repository.h | 3 --- 2 files changed, 2 insertions(+), 5 deletions(-)