libgit2/libgit2sharp — pull request #301 by dahlbyk (2013-01-19 03:38:24+00:00)
Title: CommitLog.FindCommonAncestor() Incorrect?

On seeing #300, I was curious if `git_graph_ahead_behind` would let us do away with the `FindCommonAncestor()` call in `Branch.ExistsPathToTrackedBranch()`, if we assume an error returned from libgit2 means there is not a commit in common (change attached). I'm not even sure if that's a valid assumption, but it was my theory.

Much to my surprise, it returned a different result. And if I set a breakpoint after the test setup:

```
...\TestRepos\5a3c6b59 [master +1 ~1 -1 | +1 ~5 -1 !]> git status -sb
## master...origin/master [ahead 9, behind 2]
```

So... is this a problem with our binding or `git_merge_base` in libgit2?