delete(points2);
geogig.command(AddOp.class).call();
RevCommit branchCommit = geogig.command(CommitOp.class).call();
// Now try to merge branch into master
geogig.command(CheckoutOp.class).setSource("master").call();
Ref branch = geogig.command(RefParse.class).setName("TestBranch").call().get();
try {
geogig.command(MergeOp.class).addCommit(Suppliers.ofInstance(branch.getObjectId()))
.call();
fail();
} catch (MergeConflictsException e) {
assertTrue(e.getMessage().contains("conflict"));
}
Optional<Ref> ref = geogig.command(RefParse.class).setName(Ref.ORIG_HEAD).call();
assertTrue(ref.isPresent());
assertEquals(masterCommit.getId(), ref.get().getObjectId());
ref = geogig.command(RefParse.class).setName(Ref.MERGE_HEAD).call();
assertTrue(ref.isPresent());
assertEquals(branch.getObjectId(), ref.get().getObjectId());
String msg = geogig.command(ReadMergeCommitMessageOp.class).call();
assertFalse(Strings.isNullOrEmpty(msg));
List<Conflict> conflicts = geogig.command(ConflictsReadOp.class).call();