Hopefully fixing a bug where reporting errors back to Github causes an infinite loop.
This commit is contained in:
parent
bfc56a753d
commit
ab4396e00d
|
@ -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) == '@@') {
|
||||
|
|
|
@ -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);
|
||||
|
|
Loading…
Reference in a new issue