summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorPatrick Steinhardt <ps@pks.im>2018-11-30 09:46:14 +0100
committerGitHub <noreply@github.com>2018-11-30 09:46:14 +0100
commit0ddc60944ca4727246414e8bcf3170fe8286f854 (patch)
tree54b2eac923cc1b711ac42d383777c7ca07bcc04c /include
parente7873eb2cc0e96c9eebe653b6a5ba41daea4a28e (diff)
parentcb71a9cec2e5b857c18aea678664c5f2e65c8308 (diff)
downloadlibgit2-0ddc60944ca4727246414e8bcf3170fe8286f854.tar.gz
Merge pull request #4770 from tiennou/feature/merge-analysis-any-branch
Allow merge analysis against any reference
Diffstat (limited to 'include')
-rw-r--r--include/git2/merge.h19
1 files changed, 19 insertions, 0 deletions
diff --git a/include/git2/merge.h b/include/git2/merge.h
index 47bf32daa..862721370 100644
--- a/include/git2/merge.h
+++ b/include/git2/merge.h
@@ -389,6 +389,25 @@ GIT_EXTERN(int) git_merge_analysis(
size_t their_heads_len);
/**
+ * Analyzes the given branch(es) and determines the opportunities for
+ * merging them into a reference.
+ *
+ * @param analysis_out analysis enumeration that the result is written into
+ * @param repo the repository to merge
+ * @param our_ref the reference to perform the analysis from
+ * @param their_heads the heads to merge into
+ * @param their_heads_len the number of heads to merge
+ * @return 0 on success or error code
+ */
+GIT_EXTERN(int) git_merge_analysis_for_ref(
+ git_merge_analysis_t *analysis_out,
+ git_merge_preference_t *preference_out,
+ git_repository *repo,
+ git_reference *our_ref,
+ const git_annotated_commit **their_heads,
+ size_t their_heads_len);
+
+/**
* Find a merge base between two commits
*
* @param out the OID of a merge base between 'one' and 'two'