Some git diffs (most likely octopus merges) start with diff --cc,
so we have to detect and stop log parsing when this occurs as well.
This commit is contained in:
parent
b1276dff6c
commit
c84afd0f78
@ -513,7 +513,11 @@ class IDF_Scm_Git extends IDF_Scm
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
$diffStart = strpos($out, 'diff --git a');
|
$diffStart = false;
|
||||||
|
if (preg_match('/^diff (?:--git a|--cc)/m', $out, $m, PREG_OFFSET_CAPTURE)) {
|
||||||
|
$diffStart = $m[0][1];
|
||||||
|
}
|
||||||
|
|
||||||
$diff = '';
|
$diff = '';
|
||||||
if ($diffStart !== false) {
|
if ($diffStart !== false) {
|
||||||
$log = substr($out, 0, $diffStart);
|
$log = substr($out, 0, $diffStart);
|
||||||
|
Loading…
Reference in New Issue
Block a user