title: Get changes between a commit and its parent with libgit2sharp
body: <p>I am working with libgit2sharp (a C# wrapper for libgit2) and have been running into issues because it doesnt have a lot of the functionality I am hoping for (hopefully I can contribute to it soon; this seems like a really useful project)</p>
  
  <p>The thing I am trying to do right now is get a list of the files changed from a particular commit and its parent. I will not try to figure out what has changed between a merge and its two parents. I am more interested in regular commits.</p>
  
  <p>These guys (https://github.com/libgit2/libgit2sharp/issues/89) are working on something similar. I think their procedure is a sound idea but I am a little weak on my understanding of GIT internals (there are loads of guides on an end user's guide to GIT but not so much on internal structure)</p>
  
  <p>I am curious how GIT itself does a "git diff" command. Supposedly GIT doesnt actually store deltas but rather a full version of the file (if it is unchanged it will just point to an existing SHA. This information can be found from various sources such as here <a href="http://xentac.net/2012/01/19/the-real-difference-between-git-and-mercurial.html" rel="noreferrer">http://xentac.net/2012/01/19/the-real-difference-between-git-and-mercurial.html</a>). This seems to make it harder to get the changes between two commits (in my case a particular commit and its single parent) because the data isnt stored as part of the commit (which is clear if you examine the Commit class in libgit2sharp's Commit.cs file).</p>
  
  <p>What I can get access to from a commit is the tree. Would it make sense to do the following to find this information:</p>
  
  <p>1) Start at the desired commit and walk down the tree and store all the SHA values in a set.</p>
  
  <p>2) Start at the parent for the desired commit and walk down its tree to store all its blob SHA values in another set.</p>
  
  <p>3) The SHA's for the files changed will be the files that are not in the intersection of the two sets. </p>
  
  <p>The problem I see with this approach is that it doesnt look like there is a way to get the filename from the blob's SHA value (I dont see anything that can do this in libgit2sharp's Blob.cs file).</p>
  
  <p>I know there are a lot of facets to this question but they are part of this large goal to get a particular piece of data from git.</p>
  
  <p>Thanks.</p>