+/*
+ * not really _using_ the compat macros, just make sure the_index
+ * declaration matches the definition in this file.
+ */
+#define USE_THE_INDEX_COMPATIBILITY_MACROS
#include "cache.h"
#include "repository.h"
#include "object-store.h"
#include "config.h"
#include "object.h"
+#include "lockfile.h"
#include "submodule-config.h"
/* The main repository */
static struct repository the_repo;
struct repository *the_repository;
+struct index_state the_index;
void initialize_the_repository(void)
{
return read_index_from(repo->index, repo->index_file, repo->gitdir);
}
+
+int repo_hold_locked_index(struct repository *repo,
+ struct lock_file *lf,
+ int flags)
+{
+ if (!repo->index_file)
+ BUG("the repo hasn't been setup");
+ return hold_lock_file_for_update(lf, repo->index_file, flags);
+}