From dae95a1bec21fd5db28d68cf246d6d2e3df4c91c Mon Sep 17 00:00:00 2001 From: Emmanuel Vella Date: Thu, 10 Jul 2014 15:27:15 +0200 Subject: [PATCH] Remote Git Build: Use --quiet to checkout specific revision silently Without the ``--quiet`` parameter, the cron error output get this message : ``` Note: checking out 'fe0fcd1b79f0db3d49fe6e50765bcb527e29980b'. You are in 'detached HEAD' state. You can look around, make experimental changes and commit them, and you can discard any commits you make in this state without impacting any branches by performing another checkout. If you want to create a new branch to retain commits you create, you may do so (now or later) by using -b with the checkout command again. Example: git checkout -b new_branch_name HEAD is now at fe0fcd1... ``` Closes #485 --- PHPCI/Model/Build/RemoteGitBuild.php | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/PHPCI/Model/Build/RemoteGitBuild.php b/PHPCI/Model/Build/RemoteGitBuild.php index ce7e51f5..125515c3 100644 --- a/PHPCI/Model/Build/RemoteGitBuild.php +++ b/PHPCI/Model/Build/RemoteGitBuild.php @@ -119,12 +119,14 @@ class RemoteGitBuild extends Build $commit = $this->getCommitId(); if (!empty($commit) && $commit != 'Manual') { - $cmd = 'cd "%s" && git checkout %s'; + $cmd = 'cd "%s"'; if (IS_WIN) { - $cmd = 'cd /d "%s" && git checkout %s'; + $cmd = 'cd /d "%s"'; } + $cmd .= ' && git checkout %s --quiet'; + $success = $builder->executeCommand($cmd, $cloneTo, $this->getCommitId()); }