Fixed to better detect a bad commit.

master
Loic d'Anterroches 2009-06-24 19:33:16 +02:00
parent 7d3f7e226c
commit fcefbe719f
1 changed files with 4 additions and 2 deletions

View File

@ -134,7 +134,9 @@ class IDF_Scm_Git extends IDF_Scm
{ {
$folder = ($folder == '/') ? '' : $folder; $folder = ($folder == '/') ? '' : $folder;
// now we grab the info about this commit including its tree. // now we grab the info about this commit including its tree.
$co = $this->getCommit($commit); if (false == ($co = $this->getCommit($commit))) {
return false;
}
if ($folder) { if ($folder) {
// As we are limiting to a given folder, we need to find // As we are limiting to a given folder, we need to find
// the tree corresponding to this folder. // the tree corresponding to this folder.
@ -321,7 +323,7 @@ class IDF_Scm_Git extends IDF_Scm
} }
$out = array(); $out = array();
exec($cmd, $out, $ret); exec($cmd, $out, $ret);
if ($ret != 0) { if ($ret != 0 or count($out) == 0) {
return false; return false;
} }
$log = array(); $log = array();