title: Find out the branch a commit belongs to in LibGit2Sharp?
body: <p>I am looping through commits in <code>LibGit2Sharp</code>:</p>
  
  <pre><code>Repository repo = new Repository("Z:/www/gg");
  
  foreach (LibGit2Sharp.Commit commit in repo.Commits)
  {
      ...
  }
  </code></pre>
  
  <p>I can retrieve properties like <code>Author</code> and <code>Message</code>, but I do not see anything about what branch it belongs to? Ideally I would like to have a pointer to the branch object, but even a name would be fine in this scenario.</p>
  
  <p>This is what the debugger shows up:</p>
  
  <p><img src="https://i.stack.imgur.com/KA9Hl.png" alt="enter image description here"></p>
  
  <p>This is what I am looking for:</p>
  
  <p><img src="https://i.stack.imgur.com/DykYo.png" alt="enter image description here"></p>
  
  <p>TortoiseGit's behavior of showing the most relevant branch name:</p>
  
  <p><img src="https://i.stack.imgur.com/I7HWe.png" alt="enter image description here"></p>
  
  <p>Example repository: <a href="https://docs.google.com/open?id=0B-3-X85VysdNcmZIaGVTSDZSenVGbTJxYlI2SUlsZw" rel="nofollow noreferrer">https://docs.google.com/open?id=0B-3-X85VysdNcmZIaGVTSDZSenVGbTJxYlI2SUlsZw</a></p>