Iterator<DiffEntry> difflist = geogig.command(DiffOp.class).call();
assertNotNull(difflist);
assertFalse(difflist.hasNext());
final ObjectId oid1 = insertAndAdd(points1);
final RevCommit commit1_1 = geogig.command(CommitOp.class).call();
try {
diffOp.setOldVersion(oid1.toString()).setNewVersion(Ref.HEAD).call();
fail("Expected IAE as oldVersion is not a commit");
} catch (IllegalArgumentException e) {
assertTrue(e.getMessage(), e.getMessage().contains(oid1.toString()));
assertTrue(e.getMessage(),
e.getMessage().contains("doesn't resolve to a tree-ish object"));
}
try {
diffOp.setOldVersion(commit1_1.getId().toString()).setNewVersion(oid1.toString())
.call();
fail("Expected IAE as newVersion is not a commit");
} catch (IllegalArgumentException e) {
assertTrue(e.getMessage(), e.getMessage().contains(oid1.toString()));
assertTrue(e.getMessage(),