diff options
Diffstat (limited to 'include')
| -rw-r--r-- | include/git2/errors.h | 1 | ||||
| -rw-r--r-- | include/git2/repository.h | 16 |
2 files changed, 17 insertions, 0 deletions
diff --git a/include/git2/errors.h b/include/git2/errors.h index 8ca900969..4eb9e94ef 100644 --- a/include/git2/errors.h +++ b/include/git2/errors.h @@ -64,6 +64,7 @@ typedef enum { GITERR_STASH, GITERR_CHECKOUT, GITERR_FETCHHEAD, + GITERR_MERGE, } git_error_t; /** 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. * |
