本文整理汇总了Java中org.eclipse.jgit.revwalk.RevWalk.markUninteresting方法的典型用法代码示例。如果您正苦于以下问题:Java RevWalk.markUninteresting方法的具体用法?Java RevWalk.markUninteresting怎么用?Java RevWalk.markUninteresting使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类org.eclipse.jgit.revwalk.RevWalk
的用法示例。
在下文中一共展示了RevWalk.markUninteresting方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: fetchAndCreateNewRevsWalk
import org.eclipse.jgit.revwalk.RevWalk; //导入方法依赖的package包/类
public RevWalk fetchAndCreateNewRevsWalk(Repository repository, String branch) throws Exception {
List<ObjectId> currentRemoteRefs = new ArrayList<ObjectId>();
for (Ref ref : repository.getAllRefs().values()) {
String refName = ref.getName();
if (refName.startsWith(REMOTE_REFS_PREFIX)) {
currentRemoteRefs.add(ref.getObjectId());
}
}
List<TrackingRefUpdate> newRemoteRefs = this.fetch(repository);
RevWalk walk = new RevWalk(repository);
for (TrackingRefUpdate newRef : newRemoteRefs) {
if (branch == null || newRef.getLocalName().endsWith("/" + branch)) {
walk.markStart(walk.parseCommit(newRef.getNewObjectId()));
}
}
for (ObjectId oldRef : currentRemoteRefs) {
walk.markUninteresting(walk.parseCommit(oldRef));
}
walk.setRevFilter(commitsFilter);
return walk;
}
示例2: fetchAndCreateNewRevsWalk
import org.eclipse.jgit.revwalk.RevWalk; //导入方法依赖的package包/类
public RevWalk fetchAndCreateNewRevsWalk(Repository repository, String branch) throws Exception {
List<ObjectId> currentRemoteRefs = new ArrayList<ObjectId>();
for (Ref ref : repository.getAllRefs().values()) {
String refName = ref.getName();
if (refName.startsWith(REMOTE_REFS_PREFIX)) {
currentRemoteRefs.add(ref.getObjectId());
}
}
List<TrackingRefUpdate> newRemoteRefs = this.fetch(repository);
RevWalk walk = new RevWalk(repository);
for (TrackingRefUpdate newRef : newRemoteRefs) {
if (branch == null || newRef.getLocalName().endsWith("/" + branch)) {
walk.markStart(walk.parseCommit(newRef.getNewObjectId()));
}
}
for (ObjectId oldRef : currentRemoteRefs) {
walk.markUninteresting(walk.parseCommit(oldRef));
}
walk.setRevFilter(commitsFilter);
return walk;
}