summaryrefslogtreecommitdiff
path: root/include/git2/repository.h
diff options
context:
space:
mode:
authorEdward Thomson <ethomson@microsoft.com>2013-01-03 12:44:09 -0600
committerEdward Thomson <ethomson@microsoft.com>2013-01-03 16:35:59 -0600
commit42e50b5ed10fcebab794d35cefa1eedcd79072b6 (patch)
treebf7f56bda58b5be43edf2f2ba2ea31aa49a51311 /include/git2/repository.h
parentb449a9ae8c9ac17652c5ab006859dd29b62a5b48 (diff)
downloadlibgit2-42e50b5ed10fcebab794d35cefa1eedcd79072b6.tar.gz
MERGE_HEAD contents iterator
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.
*