本文整理了Java中org.locationtech.geogig.model.Ref.equals
方法的一些代码示例,展示了Ref.equals
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Ref.equals
方法的具体详情如下:
包路径:org.locationtech.geogig.model.Ref
类名称:Ref
方法名:equals
暂无
代码示例来源:origin: locationtech/geogig
private boolean isNothingToCommit(PullResult pullResult) {
return pullResult.getNewRef().equals(pullResult.getOldRef());
}
代码示例来源:origin: locationtech/geogig
@Test
public void testEquals() throws Exception {
Ref testRef = new Ref(Ref.REFS_PREFIX + "commit1", oid);
Ref testRef2 = new Ref(Ref.REFS_PREFIX + "commit2", oid2);
assertFalse(testRef.equals(testRef2));
testRef2 = new Ref(Ref.REFS_PREFIX + "commit1", oid3);
assertFalse(testRef.equals(testRef2));
assertFalse(testRef.equals("not a ref"));
assertTrue(testRef.equals(testRef));
}
代码示例来源:origin: locationtech/geogig
liveTargetBranch.getObjectId());
if (!liveTargetBranch.equals(prTargetBranch)) {
setRef(txContext, prTargetBranch.getName(), liveTargetBranch.getObjectId());
代码示例来源:origin: org.locationtech.geogig/geogig-web-api
private AutoCloseableIterator<DiffEntry> resolveDiff(Context geogig, PullResult result) {
AutoCloseableIterator<DiffEntry> iter;
if (result.getOldRef() != null && result.getOldRef().equals(result.getNewRef())) {
iter = null;
} else {
if (result.getOldRef() == null) {
iter = geogig.command(DiffOp.class).setNewVersion(result.getNewRef().getObjectId())
.setOldVersion(ObjectId.NULL).call();
} else {
iter = geogig.command(DiffOp.class).setNewVersion(result.getNewRef().getObjectId())
.setOldVersion(result.getOldRef().getObjectId()).call();
}
}
return iter;
}
}
内容来源于网络,如有侵权,请联系作者删除!