git gc runs and
Repository has an instance to
Rugged::Repository, a bug in libgit2 may cause the instance to return a stale value or a missing branch. This change not only optimizes the branch lookup so we don't have to iterate through every branch, but it also works around the
git gc issue by forcing a repository reload every time
Repository#find_branch is called.