libgit2

git_merge_analysis_t

Version:

The results of git_merge_analysis indicate the merge opportunities.

Values

GIT_MERGE_ANALYSIS_NONE
0

No merge is possible. (Unused.)

GIT_MERGE_ANALYSIS_NORMAL
(1 << 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_ANALYSIS_UP_TO_DATE
(1 << 1)

All given merge inputs are reachable from HEAD, meaning the repository is up-to-date and no merge needs to be performed.

GIT_MERGE_ANALYSIS_FASTFORWARD
(1 << 2)

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_ANALYSIS_UNBORN
(1 << 3)

The HEAD of the current repository is "unborn" and does not point to a valid commit. No merge can be performed, but the caller may wish to simply set HEAD to the target commit(s).

Parameter To

Versions