libgit2/libgit2sharp — pull request #217 by yorah (2012-09-25 15:40:12+00:00)
Title: Add support for unborn branches

Fixes #216

Here is the state for all cases:
- Unborn branch: `null/false/null/null`
- Local branch with no tracked branch: `null/false/null/null`.
- Local branch with a tracked branch, but which does not share history with it: `something/true/null/null`.

Thoughts for the future: with git.git, a local branch can have more than one tracked branch.
This does not seem to be yet supported by libgit2: `git_branch_tracking` can only be used to get one reference.

However, when it is supported, it means that AheadBy/BehindBy surely won't be properties of the Branch anymore. One idea could be to have a `IEnumerable` in Branch, which would contain this information (and the information linked to each TrackedBranch).