public function getLogBetweenCommits($start, $end)
{
// First we get all the commits, then of each commit we get the actual data
// We can't the commit data in one go because the body contains newlines
$commits = StringUtil::splitLines($this->processHelper->runCommand(['git', '--no-pager', 'log', '--oneline', '--no-color', '--format=%H', '--reverse', $start . '..' . $end]));
return array_map(function ($commitHash) {
// 0=author, 1=subject, anything higher then 2 is the full body
$commitData = StringUtil::splitLines($this->processHelper->runCommand(['git', '--no-pager', 'show', '--format=%an <%ae>%n%s%n%b', '--no-color', '--no-patch', $commitHash]));
return ['sha' => $commitHash, 'author' => array_shift($commitData), 'subject' => $commitData[0], 'message' => array_shift($commitData) . "\n\n" . implode("\n", $commitData)];
}, $commits);
}