libgit2/libgit2sharp — pull request #457 by yorah (2013-06-21 13:46:45+00:00)
Title: Create a new repo.Checkout() overload which accepts a Commit object

Fixes #445

- [x] Add `Branch Checkout(Commit commit, CheckoutOptions checkoutOptions, CheckoutProgressHandler onCheckoutProgress);` prototype to `IRepository`
- [x] Make `Repository` implement this
- [x] Refactor the existing `Repository.Checkout()` methods to delegate to the same internal method
- [x] Create new method `public static Branch Checkout(this IRepository repository, Commit commit)` in `RepositoryExtensions`
- [x] Modify `CheckoutFixture.CanCheckoutAnArbitraryCommit()` to leverage this and actually test the processing of either the commit or the commitPointer

Differences from the initial issue:
- I modified the `CheckoutFixture.CanCheckoutAnArbitraryCommit()`, and not the `CheckoutFixture.CheckoutFromDetachedHead()`
- Due to differences in reflog expectations when passing a committish or a branch spec, the new `Checkout()` methods actually delegate to the private `CheckoutTree`