summaryrefslogtreecommitdiff
path: root/include/git2/repository.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/git2/repository.h')
-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 02e689111..1371d5409 100644
--- a/include/git2/repository.h
+++ b/include/git2/repository.h
@@ -517,6 +517,22 @@ GIT_EXTERN(int) git_repository_fetchhead_foreach(git_repository *repo,
git_repository_fetchhead_foreach_cb callback,
void *payload);
+typedef int (*git_repository_mergehead_foreach_cb)(const git_oid *oid,
+ void *payload);
+
+/**
+ * If a merge is in progress, call callback 'cb' for each commit ID in the
+ * MERGE_HEAD file.
+ *
+ * @param repo A repository object
+ * @param callback Callback function
+ * @param apyload Pointer to callback data (optional)
+ * @return 0 on success, GIT_ENOTFOUND, GIT_EUSER or error
+ */
+GIT_EXTERN(int) git_repository_mergehead_foreach(git_repository *repo,
+ git_repository_mergehead_foreach_cb callback,
+ void *payload);
+
/**
* Calculate hash of file using repository filtering rules.
*