List of usage examples for org.eclipse.jgit.lib MutableObjectId toObjectId
@Override
public ObjectId toObjectId()
From source file:org.gitective.core.filter.commit.DuplicateTreeFilter.java
License:Open Source License
public boolean include(final RevWalk walker, final RevCommit commit) throws IOException { final TreeWalk walk = TreeUtils.diffWithParents(walker, commit); final MutableObjectId id = new MutableObjectId(); final ObjectId zero = ObjectId.zeroId(); final DuplicateContainer dupes = new DuplicateContainer(commit); while (walk.next()) { if (!walk.isSubtree()) continue; final String path = walk.getPathString(); for (int i = 0; i < walk.getTreeCount(); i++) { walk.getObjectId(id, i);//from w w w. j ava2 s. com if (!zero.equals(id)) dupes.include(id.toObjectId(), path); } walk.enterSubtree(); } if (dupes.validate()) duplicates.put(commit, dupes); return true; }