diff options
author | Edward Thomson <ethomson@microsoft.com> | 2014-03-18 13:14:09 -0700 |
---|---|---|
committer | Edward Thomson <ethomson@microsoft.com> | 2014-03-20 09:25:10 -0700 |
commit | 97f3462ae699fae370cfa410ed58eb869ae6b276 (patch) | |
tree | 840b573fa746fd895086dd5d39d3de422cc165b2 /include | |
parent | d9fdee6e4cb87e4531d9ddba92b44e5323e794da (diff) | |
download | libgit2-97f3462ae699fae370cfa410ed58eb869ae6b276.tar.gz |
git_merge_status -> git_merge_analysis
Diffstat (limited to 'include')
-rw-r--r-- | include/git2/merge.h | 23 |
1 files changed, 13 insertions, 10 deletions
diff --git a/include/git2/merge.h b/include/git2/merge.h index a4432eef3..2cb8df36c 100644 --- a/include/git2/merge.h +++ b/include/git2/merge.h @@ -235,41 +235,44 @@ GIT_EXTERN(int) git_merge_init_options( int version); /** - * The results of `git_merge_status` indicate the state of a merge scenario. + * The results of `git_merge_analysis` indicate the merge opportunities. */ typedef enum { + /** No merge is possible. (Unused.) */ + GIT_MERGE_ANALYSIS_NONE = 0, + /** * A "normal" merge; both HEAD and the given merge input have diverged * from their common ancestor. The divergent commits must be merged. */ - GIT_MERGE_STATUS_NORMAL = 0, + GIT_MERGE_ANALYSIS_NORMAL = (1 << 0), /** * The repository is already up-to-date and no merge needs to be * performed. The given merge input already exists as a parent of HEAD. */ - GIT_MERGE_STATUS_UP_TO_DATE = (1 << 0), + GIT_MERGE_ANALYSIS_UP_TO_DATE = (1 << 1), /** * The given merge input is a fast-forward from HEAD and no merge * needs to be performed. Instead, the client can check out the * given merge input. */ - GIT_MERGE_STATUS_FASTFORWARD = (1 << 1), -} git_merge_status_t; + GIT_MERGE_ANALYSIS_FASTFORWARD = (1 << 2), +} git_merge_analysis_t; /** - * Determine the status of the merge between the given branch(es) and the - * HEAD of the repository. + * Analyzes the given branch(es) and determines the opportunities for + * merging them into the HEAD of the repository. * - * @param status_out status enumeration that the result is written into + * @param analysis_out analysis enumeration that the result is written into * @param repo the repository to merge * @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_status( - git_merge_status_t *status_out, +GIT_EXTERN(int) git_merge_analysis( + git_merge_analysis_t *analysis_out, git_repository *repo, const git_merge_head **their_heads, size_t their_heads_len); |