Java Code Examples for org.eclipse.jgit.api.MergeResult#MergeStatus

The following examples show how to use org.eclipse.jgit.api.MergeResult#MergeStatus . You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: GitMergeResult.java    From netbeans with Apache License 2.0 5 votes vote down vote up
static MergeStatus parseMergeStatus (MergeResult.MergeStatus mergeStatus) {
    if (mergeStatus == MergeResult.MergeStatus.FAST_FORWARD_SQUASHED) {
        mergeStatus = MergeResult.MergeStatus.FAST_FORWARD;
    } else if (mergeStatus == MergeResult.MergeStatus.MERGED_SQUASHED) {
        mergeStatus = MergeResult.MergeStatus.MERGED;
    } else if (mergeStatus == MergeResult.MergeStatus.MERGED_NOT_COMMITTED) {
        mergeStatus = MergeResult.MergeStatus.MERGED;
    } else if (mergeStatus == MergeResult.MergeStatus.MERGED_SQUASHED_NOT_COMMITTED) {
        mergeStatus = MergeResult.MergeStatus.MERGED;
    } else if (mergeStatus == MergeResult.MergeStatus.CHECKOUT_CONFLICT) {
        mergeStatus = MergeResult.MergeStatus.CONFLICTING;
    }
    return GitMergeResult.MergeStatus.valueOf(mergeStatus.name());
}
 
Example 2
Source File: GitEnumsStateTest.java    From netbeans with Apache License 2.0 4 votes vote down vote up
public void testMergeStatus () {
    for (MergeResult.MergeStatus status : MergeResult.MergeStatus.values()) {
        assertNotNull(GitMergeResult.parseMergeStatus(status));
    }
}