diff options
author | Vicent Marti <vicent@github.com> | 2014-05-28 13:47:55 +0200 |
---|---|---|
committer | Vicent Marti <vicent@github.com> | 2014-05-28 13:47:55 +0200 |
commit | 63e8c3fde26c20c36c3d850d48e1d94a437318cf (patch) | |
tree | 0e2eed2ab33d565c09a848d3af552959877a4bef /include/git2/merge.h | |
parent | 433ba614a2ef948008510a1b1189702d515d2fc4 (diff) | |
parent | eff531e1034401b144b02ff2913a361669d04129 (diff) | |
download | libgit2-63e8c3fde26c20c36c3d850d48e1d94a437318cf.tar.gz |
Merge pull request #2337 from ethomson/merge_ff
Introduce GIT_MERGE_CONFIG_* for merge.ff settings
Diffstat (limited to 'include/git2/merge.h')
-rw-r--r-- | include/git2/merge.h | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/include/git2/merge.h b/include/git2/merge.h index 7915050b0..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); |