diff options
Diffstat (limited to 'include/git2/merge.h')
-rw-r--r-- | include/git2/merge.h | 31 |
1 files changed, 26 insertions, 5 deletions
diff --git a/include/git2/merge.h b/include/git2/merge.h index abbc3a5bb..9eb14ccb1 100644 --- a/include/git2/merge.h +++ b/include/git2/merge.h @@ -268,6 +268,26 @@ typedef enum { GIT_MERGE_ANALYSIS_UNBORN = (1 << 3), } git_merge_analysis_t; +typedef enum { + /* + * No configuration was found that suggests a preferred behavior for + * merge. + */ + GIT_MERGE_PREFERENCE_NONE = 0, + + /** + * There is a `merge.ff=false` configuration setting, suggesting that + * the user does not want to allow a fast-forward merge. + */ + GIT_MERGE_PREFERENCE_NO_FASTFORWARD = (1 << 0), + + /** + * There is a `merge.ff=only` configuration setting, suggesting that + * the user only wants fast-forward merges. + */ + GIT_MERGE_PREFERENCE_FASTFORWARD_ONLY = (1 << 1), +} git_merge_preference_t; + /** * Analyzes the given branch(es) and determines the opportunities for * merging them into the HEAD of the repository. @@ -280,6 +300,7 @@ typedef enum { */ GIT_EXTERN(int) git_merge_analysis( git_merge_analysis_t *analysis_out, + git_merge_preference_t *preference_out, git_repository *repo, const git_merge_head **their_heads, size_t their_heads_len); @@ -378,8 +399,8 @@ GIT_EXTERN(int) git_merge_head_from_id( /** * Gets the commit ID that the given `git_merge_head` refers to. * - * @param id pointer to commit id to be filled in * @param head the given merge head + * @return commit id */ GIT_EXTERN(const git_oid *) git_merge_head_id( const git_merge_head *head); @@ -424,8 +445,8 @@ GIT_EXTERN(int) git_merge_file( * @param out The git_merge_file_result to be filled in * @param repo The repository * @param ancestor The index entry for the ancestor file (stage level 1) - * @param our_path The index entry for our file (stage level 2) - * @param their_path The index entry for their file (stage level 3) + * @param ours The index entry for our file (stage level 2) + * @param theirs The index entry for their file (stage level 3) * @param opts The merge file options or NULL * @return 0 on success or error code */ @@ -497,8 +518,8 @@ GIT_EXTERN(int) git_merge_commits( * completes, resolve any conflicts and prepare a commit. * * @param repo the repository to merge - * @param merge_heads the heads to merge into - * @param merge_heads_len the number of heads to merge + * @param their_heads the heads to merge into + * @param their_heads_len the number of heads to merge * @param merge_opts merge options * @param checkout_opts checkout options * @return 0 on success or error code |