Allow objects of type Branch to be passed to Repository.checkout()
Branch inherits from Reference, so there's no reason why we shouldn't be able to pass a Branch object.
This commit is contained in:
@@ -263,7 +263,7 @@ class Repository(_Repository):
|
||||
return self.checkout_head(**kwargs)
|
||||
|
||||
# Case 3: Reference
|
||||
if type(refname) is Reference:
|
||||
if isinstance(refname, Reference):
|
||||
reference = refname
|
||||
refname = refname.name
|
||||
else:
|
||||
|
Reference in New Issue
Block a user