Fixes the case of an empty repository again.
This commit is contained in:
parent
b75286375e
commit
a53c6a1778
@ -38,11 +38,11 @@ class IDF_Scm_Git extends IDF_Scm
|
|||||||
public function isAvailable()
|
public function isAvailable()
|
||||||
{
|
{
|
||||||
try {
|
try {
|
||||||
$this->getBranches();
|
$branches = $this->getBranches();
|
||||||
} catch (IDF_Scm_Exception $e) {
|
} catch (IDF_Scm_Exception $e) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
return true;
|
return (count($branches) > 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
public function getBranches()
|
public function getBranches()
|
||||||
|
Loading…
Reference in New Issue
Block a user