Fixes the case of an empty repository again.

This commit is contained in:
Loic d'Anterroches 2009-05-27 17:04:41 +02:00
parent b75286375e
commit a53c6a1778

View File

@ -38,11 +38,11 @@ class IDF_Scm_Git extends IDF_Scm
public function isAvailable()
{
try {
$this->getBranches();
$branches = $this->getBranches();
} catch (IDF_Scm_Exception $e) {
return false;
}
return true;
return (count($branches) > 0);
}
public function getBranches()