summaryrefslogtreecommitdiff
path: root/include/git2
diff options
context:
space:
mode:
Diffstat (limited to 'include/git2')
-rw-r--r--include/git2/repository.h16
1 files changed, 16 insertions, 0 deletions
diff --git a/include/git2/repository.h b/include/git2/repository.h
index 193ac9523..d72431538 100644
--- a/include/git2/repository.h
+++ b/include/git2/repository.h
@@ -569,6 +569,22 @@ GIT_EXTERN(int) git_repository_set_head_detached(
GIT_EXTERN(int) git_repository_detach_head(
git_repository* repo);
+typedef enum {
+ GIT_REPOSITORY_STATE_NONE,
+ GIT_REPOSITORY_STATE_MERGE,
+ GIT_REPOSITORY_STATE_REVERT,
+ GIT_REPOSITORY_STATE_CHERRY_PICK,
+} git_repository_state_t;
+
+/**
+ * Determines the status of a git repository - ie, whether an operation
+ * (merge, cherry-pick, etc) is in progress.
+ *
+ * @param repo Repository pointer
+ * @return The state of the repository
+ */
+GIT_EXTERN(int) git_repository_state(git_repository *repo);
+
/** @} */
GIT_END_DECL
#endif