ReFixed in an ugly way the non support of the git --contains option.

This commit is contained in:
Loïc d'Anterroches 2011-03-17 09:28:43 +01:00
parent 21a8c281ec
commit 5f008a14f5

View File

@ -214,9 +214,6 @@ class IDF_Scm_Git extends IDF_Scm
Pluf::f('git_path', 'git')); Pluf::f('git_path', 'git'));
self::exec('IDF_Scm_Git::getTags', $cmd, $out, $return); self::exec('IDF_Scm_Git::getTags', $cmd, $out, $return);
if (0 != $return) { if (0 != $return) {
$this->cache['tags'] = array();
return array();
// Ugly emergency fix, needs to be cleaned.
throw new IDF_Scm_Exception(sprintf($this->error_tpl, throw new IDF_Scm_Exception(sprintf($this->error_tpl,
$cmd, $return, $cmd, $return,
implode("\n", $out))); implode("\n", $out)));
@ -252,6 +249,9 @@ class IDF_Scm_Git extends IDF_Scm
escapeshellarg($commit)); escapeshellarg($commit));
self::exec('IDF_Scm_Git::inTags', $cmd, $out, $return); self::exec('IDF_Scm_Git::inTags', $cmd, $out, $return);
if (0 != $return) { if (0 != $return) {
$this->cache['tags'] = array();
return array();
// Ugly emergency fix, needs to be cleaned.
throw new IDF_Scm_Exception(sprintf($this->error_tpl, throw new IDF_Scm_Exception(sprintf($this->error_tpl,
$cmd, $return, $cmd, $return,
implode("\n", $out))); implode("\n", $out)));