Fixed bug, wasn't setting default ref correctly for git repos without a master branch

This commit is contained in:
Correl Roush 2010-11-22 00:16:26 -05:00
parent 3cb107306a
commit 161482ccb6

View file

@ -117,7 +117,7 @@ class Git(VCS):
if 'master' in self.branches():
self._ref = 'master'
else:
self.ref = self.branches()[0]
self._ref = self.branches()[0]
def branches(self):
if not self._branches:
self._branches = dict([(head.name, self.commit(head.commit)) for head in self._repo.heads])