/**
* @param null $ref
* @return int
*/
public function getLog($ref = null)
{
$this->git->fetch();
if (is_null($ref)) {
$ref = $this->getCurrentBranchName();
}
$log = array_map(function ($entry) {
$log = [];
list($log['hash'], $log['message']) = explode(' ', $entry, 2);
return $log;
}, explode(PHP_EOL, trim($this->git->log($ref, ['oneline' => true])->getOutput())));
return $log;
}