title: Staging an individual hunk using PyGit2
body: <p>I'm trying to implement <code>git add -p</code> in pygit2, so I can make an alternative frontend to it. So I need to be able to stage individual hunks, first and foremost.</p>
  
  <p>I'm able to find the hunks by using <code>diff_to_workdir</code> from the index, like this:</p>
  
  <pre><code>index.diff_to_workdir(0,1,1)[0].hunks
  </code></pre>
  
  <p>But I'm not sure exactly how to proceed from there. In fact, my intuition tells me that I don't stage things at all, but rather put together a commit myself and then hand it to the repo.</p>
  
  <p>I have the sense that I ultimately need to be able to create a blob from the hunk and then use TreeBuilder to create a commit. But I just can't get there! It seems like I can only create blobs from files. Can anyone give a little guidance?</p>