# Snippets

## Finding children of a commit

    PlotWalk revWalk = new PlotWalk(repo());
    ObjectId rootId = (branch==null)?repo().resolve(HEAD):branch.getObjectId();
    RevCommit root = revWalk.parseCommit(rootId);
    revWalk.markStart(root);
    PlotCommitList<PlotLane> plotCommitList = new PlotCommitList<PlotLane>();
    plotCommitList.source(revWalk);
    plotCommitList.fillTo(Integer.MAX_VALUE);
    return revWalk;