From e423c73c4e0bbe87e1bf1d4506335be23b900662 Mon Sep 17 00:00:00 2001 From: Dan Cryer Date: Wed, 25 Feb 2015 14:13:28 +0000 Subject: [PATCH] Fixing comparison where commit ID is Manual. Fixes #823 --- PHPCI/Model/Build/GithubBuild.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/PHPCI/Model/Build/GithubBuild.php b/PHPCI/Model/Build/GithubBuild.php index 7c8f3f6f..1482f1c0 100644 --- a/PHPCI/Model/Build/GithubBuild.php +++ b/PHPCI/Model/Build/GithubBuild.php @@ -209,7 +209,9 @@ class GithubBuild extends RemoteGitBuild if (!empty($prNumber)) { $builder->executeCommand('cd %s && git diff origin/%s "%s"', $path, $this->getBranch(), $file); } else { - $builder->executeCommand('cd %s && git diff %s^! "%s"', $path, $this->getCommitId(), $file); + $commitId = $this->getCommitId(); + $compare = $commitId == 'Manual' ? 'HEAD' : $commitId; + $builder->executeCommand('cd %s && git diff %s^! "%s"', $path, $compare, $file); } $builder->logExecOutput(true);