org.locationtech.geogig.model.Ref.equals()方法的使用及代码示例

x33g5p2x  于2022-01-29 转载在 其他  
字(1.6k)|赞(0)|评价(0)|浏览(161)

本文整理了Java中org.locationtech.geogig.model.Ref.equals方法的一些代码示例,展示了Ref.equals的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Ref.equals方法的具体详情如下:
包路径:org.locationtech.geogig.model.Ref
类名称:Ref
方法名:equals

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;
  }
}

相关文章