libgit2/pygit2 — pull request #408 by djmattyg007 (2014-08-23 02:02:06+00:00)
Title: Allow passing of Branch objects to Repository.checkout()

Currently the Repository.checkout() method checks to see if the refname
parameter is a Reference object with the following check:

if type(refname) is Reference:

This does not allow subclasses of Reference (such as Branch) to be used.

This pull request remedies this issue by changing the check to use
instanceof(), like so:

if instanceof(refname, Reference):

This pull request also adds a new test for this functionality.