title: How to traverse Git repositories with JGit and draw a graph
body: <p>I need to draw a graph out of a Git repository using JGit.</p>
  
  <p>I've been thinking about different ways to traverse the commits. I need to be able to draw a graph/graphs out of the branches/commits, and I also need to be able to do it within arbitrary ranges, like let's say from 200th commit to 250th commit (skipping the 200 most recently made commits).</p>
  
  <p>How should I traverse the repository? Using <code>RevWalk</code>? I'd like to keep it adequately performant, and I was wondering if there's a one definite way to do this well.</p>
  
  <p><strong>Update:</strong> Basically I'm looking into making something like <code>git log --graph -n 50 --skip 200</code> which shows a graph of the repository between 200-250 commits in creation order. Now I just want to do this myself. :)</p>
  
  <p><strong>Update 2:</strong> It would be nice if I could also iterate over the ones that are dangling (have no references), and draw them in gray color.</p>