From e3ff9d405a78ad7894d5d1e60ce9045d127364dc Mon Sep 17 00:00:00 2001 From: Dmitry Khomutov Date: Wed, 12 Mar 2014 23:04:56 +0700 Subject: [PATCH] Fixed git checkout for commitId = 'Manual' --- PHPCI/Model/Build/RemoteGitBuild.php | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/PHPCI/Model/Build/RemoteGitBuild.php b/PHPCI/Model/Build/RemoteGitBuild.php index 35aa8c90..43d1e6f7 100644 --- a/PHPCI/Model/Build/RemoteGitBuild.php +++ b/PHPCI/Model/Build/RemoteGitBuild.php @@ -65,7 +65,11 @@ class RemoteGitBuild extends Build protected function cloneByHttp(Builder $builder, $cloneTo) { $success = $builder->executeCommand('git clone -b %s %s "%s"', $this->getBranch(), $this->getCloneUrl(), $cloneTo); - $builder->executeCommand('cd "%s" && git checkout %s', $cloneTo, $this->getCommitId()); + + if (!empty($commit) && $commit != 'Manual') { + $builder->executeCommand('cd "%s" && git checkout %s', $cloneTo, $this->getCommitId()); + } + return $success; }