libgit2/objective-git — pull request #73 by jspahrsummers (2012-07-25 23:48:21+00:00)
Title: GTBranch.repository should be strong

This might seem counter-intuitive at first.

However, `GTRepository` does not retain `GTBranch` objects in any way, and several `GTBranch` methods make use of the repository. The result (right now) is that branches can easily outlive the repositories they're associated with, resulting in a crash when the branch needs to go to the repo to retrieve information.

The easiest solution here is to make `GTBranch.repository` strong, which (as implied by the above) will not cause a retain cycle.