diff --git a/public_html/deployment/classes/vcs.git.class.php b/public_html/deployment/classes/vcs.git.class.php index a7b35edb5cd0b915c43e61adf8e29bfb9bfa175f..b87e8c51ed243e8c74a2eb778400af4946e03bf1 100644 --- a/public_html/deployment/classes/vcs.git.class.php +++ b/public_html/deployment/classes/vcs.git.class.php @@ -120,7 +120,9 @@ class vcs implements iVcs { $sGitCmd.='git remote add origin "' . $this->getUrl() . '" 2>&1 '; // $sGitCmd='time ('.$sGitCmd.')'; // exec($sGitCmd, $aOutput, $iRc); - exec($sGitCmd); + $this->log(__FUNCTION__." start command <code>$sGitCmd</code>"); + exec($sGitCmd, $aOutput,$iRc); + $this->log(__FUNCTION__." command ended with rc=$iRc ". '<pre>'.implode("\n", $aOutput).'</pre>', ($iRc==0 ? 'info':'error')); } return $this->_sTempDir; } @@ -408,6 +410,14 @@ class vcs implements iVcs { } $sGitCmd = 'export GIT_SSH="' . $this->_sWrapper . '" ; export PKEY="' . $this->_sKeyfile . '" ; '; + + // Luki: + // git clone -b <branch_or_tag> --single-branch <repo_url> --depth 1 --bare <dir> + /* + $sWorkDir=$sWorkDir ? $sWorkDir : $this->_sTempDir; + $sWorkDir='/dev/shm/abc'; + $sGitCmd.='git clone -b '.$this->_sCurrentBranch.' --single-branch '.$this->getUrl().' --depth 1 --bare "' . $sWorkDir . '" 2>&1; rm -rf "' . $sWorkDir . '"'; + */ if ($sWorkDir) { $sGitCmd.='cd "' . $sWorkDir . '" && '; } else { @@ -422,7 +432,7 @@ class vcs implements iVcs { // TODO: git 1.9 does needs only the line with --tags $sGitCmd.=' ( ' . 'git fetch --update-head-ok --tags --depth 1 2>&1 ; ' // 1.5 s - . 'git fetch --update-head-ok --depth 1 2>&1 ' // 1.5 s + //. 'git fetch --update-head-ok --depth 1 2>&1 ' // 1.5 s . ') && '; }