Hopefully fixing a bug where reporting errors back to Github causes an infinite loop.

This commit is contained in:
Dan Cryer 2015-02-26 08:31:58 +00:00
parent bfc56a753d
commit ab4396e00d
2 changed files with 6 additions and 2 deletions

View file

@ -26,11 +26,15 @@ class Diff
*/
public function getLinePositions($diff)
{
if (empty($diff)) {
return null;
}
$rtn = array();
$diffLines = explode(PHP_EOL, $diff);
while (1) {
while (count($diffLines)) {
$line = array_shift($diffLines);
if (substr($line, 0, 2) == '@@') {

View file

@ -211,7 +211,7 @@ class GithubBuild extends RemoteGitBuild
} else {
$commitId = $this->getCommitId();
$compare = $commitId == 'Manual' ? 'HEAD' : $commitId;
$builder->executeCommand('cd %s && git diff %s^! "%s"', $path, $compare, $file);
$builder->executeCommand('cd %s && git diff %s^^ "%s"', $path, $compare, $file);
}
$builder->logExecOutput(true);