From a53c6a1778f9a2e4023c8719974e645c32676959 Mon Sep 17 00:00:00 2001 From: Loic d'Anterroches Date: Wed, 27 May 2009 17:04:41 +0200 Subject: [PATCH] Fixes the case of an empty repository again. --- src/IDF/Scm/Git.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/IDF/Scm/Git.php b/src/IDF/Scm/Git.php index e65e112..cc028c0 100644 --- a/src/IDF/Scm/Git.php +++ b/src/IDF/Scm/Git.php @@ -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()