summaryrefslogtreecommitdiff
path: root/repository.h
diff options
context:
space:
mode:
authorBrandon Williams <bmwill@google.com>2017-06-22 11:43:43 -0700
committerJunio C Hamano <gitster@pobox.com>2017-06-23 18:24:34 -0700
commit639e30b5b2214c68c042215a279ac1fbb372d73d (patch)
treefeb1abd69119562b7913d7094a8e1911f909c906 /repository.h
parent3b256228a66f8587661481ef3e08259864f3ba2a (diff)
downloadgit-639e30b5b2214c68c042215a279ac1fbb372d73d.tar.gz
repository: add index_state to struct repo
Signed-off-by: Brandon Williams <bmwill@google.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'repository.h')
-rw-r--r--repository.h9
1 files changed, 9 insertions, 0 deletions
diff --git a/repository.h b/repository.h
index 8ae5e8653a..3a41568aa0 100644
--- a/repository.h
+++ b/repository.h
@@ -2,6 +2,7 @@
#define REPOSITORY_H
struct config_set;
+struct index_state;
struct repository {
/* Environment */
@@ -49,6 +50,12 @@ struct repository {
*/
struct config_set *config;
+ /*
+ * Repository's in-memory index.
+ * 'repo_read_index()' can be used to populate 'index'.
+ */
+ struct index_state *index;
+
/* Configurations */
/*
* Bit used during initialization to indicate if repository state (like
@@ -71,4 +78,6 @@ extern void repo_set_worktree(struct repository *repo, const char *path);
extern int repo_init(struct repository *repo, const char *gitdir, const char *worktree);
extern void repo_clear(struct repository *repo);
+extern int repo_read_index(struct repository *repo);
+
#endif /* REPOSITORY_H */