本文整理了Java中org.eclipse.jgit.lib.Repository.getAdditionalHaves
方法的一些代码示例,展示了Repository.getAdditionalHaves
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Repository.getAdditionalHaves
方法的具体详情如下:
包路径:org.eclipse.jgit.lib.Repository
类名称:Repository
方法名:getAdditionalHaves
[英]Objects known to exist but not expressed by #getAllRefs().
When a repository borrows objects from another repository, it can advertise that it safely has that other repository's references, without exposing any other details about the other repository. This may help a client trying to push changes avoid pushing more than it needs to.
[中]已知存在但未用#getAllRefs()表示的对象。
当一个存储库从另一个存储库借用对象时,它可以宣布它安全地拥有另一个存储库的引用,而不公开关于另一个存储库的任何其他详细信息。这可能有助于尝试推动更改的客户避免推动超出其需要的更改。
代码示例来源:origin: org.eclipse.jgit/org.eclipse.jgit
advertisedHaves.addAll(additionalHaves);
else
advertisedHaves.addAll(db.getAdditionalHaves());
代码示例来源:origin: org.eclipse.jgit/org.eclipse.jgit
for (ObjectId id : local.getAdditionalHaves())
parseReachable(id);
代码示例来源:origin: berlam/github-bucket
advertisedHaves.addAll(additionalHaves);
else
advertisedHaves.addAll(db.getAdditionalHaves());
代码示例来源:origin: sonia.jgit/org.eclipse.jgit
advertisedHaves.addAll(additionalHaves);
else
advertisedHaves.addAll(db.getAdditionalHaves());
代码示例来源:origin: sonia.jgit/org.eclipse.jgit
/**
* Objects known to exist but not expressed by {@link #getAllRefs()}.
* <p>
* When a repository borrows objects from another repository, it can
* advertise that it safely has that other repository's references, without
* exposing any other details about the other repository. This may help
* a client trying to push changes avoid pushing more than it needs to.
*
* @return unmodifiable collection of other known objects.
*/
public Set<ObjectId> getAdditionalHaves() {
HashSet<ObjectId> r = new HashSet<ObjectId>();
for (AlternateHandle d : objectDatabase.myAlternates()) {
if (d instanceof AlternateRepository) {
Repository repo;
repo = ((AlternateRepository) d).repository;
for (Ref ref : repo.getAllRefs().values()) {
if (ref.getObjectId() != null)
r.add(ref.getObjectId());
if (ref.getPeeledObjectId() != null)
r.add(ref.getPeeledObjectId());
}
r.addAll(repo.getAdditionalHaves());
}
}
return r;
}
代码示例来源:origin: sonia.jgit/org.eclipse.jgit
for (ObjectId id : local.getAdditionalHaves())
parseReachable(id);
代码示例来源:origin: berlam/github-bucket
for (ObjectId id : local.getAdditionalHaves())
parseReachable(id);
内容来源于网络,如有侵权,请联系作者删除!