Example usage for org.eclipse.jgit.treewalk TreeWalk isPostChildren

List of usage examples for org.eclipse.jgit.treewalk TreeWalk isPostChildren

Introduction

In this page you can find the example usage for org.eclipse.jgit.treewalk TreeWalk isPostChildren.

Prototype

public boolean isPostChildren() 

Source Link

Document

Is the current entry a subtree returned after its children?

Usage

From source file:org.gitective.core.TreeUtils.java

License:Open Source License

private static boolean visit(final Repository repository, final TreeWalk walk, final MutableObjectId id,
        final String path, final ITreeVisitor visitor) throws IOException {
    while (walk.next()) {
        if (walk.isPostChildren())
            break;

        if (walk.isSubtree()) {
            final String subTreePath = walk.getPathString();
            walk.enterSubtree();/*from ww  w.  j a v  a2 s . co  m*/
            if (!visit(repository, walk, id, subTreePath, visitor))
                return false;
        }

        walk.getObjectId(id, 0);
        if (!visitor.accept(walk.getFileMode(0), path, walk.getNameString(), id))
            return false;
    }
    return true;
}