{
if (!$commitish) {
return $this->system->getCommit($this->repository);
}
$commitish = new Commitish($this, $commitish);
return $this->system->getCommit($this->repository, $commitish->getHash());
}
public function getCommits(?string $commitish, int $page, int $perPage): array
{
if (!$commitish) {
return $this->system->getCommits($this->repository, null, $page, $perPage);
}
$commitish = new Commitish($this, $commitish);
if ($commitish->hasPath()) {
return $this->system->getCommitsFromPath($this->repository, $commitish->getPath(), $commitish->getHash(), $page, $perPage);
}
return $this->system->getCommits($this->repository, $commitish->getHash(), $page, $perPage);
}
public function getSpecificCommits(array $hashes): array
{
return $this->system->getSpecificCommits($this->repository, $hashes);
}
public function getBlame(string $commitish): Blame
{
$commitish = new Commitish($this, $commitish);
$blame = $this->system->getBlame($this->repository, $commitish->getHash(), $commitish->getPath());
$consolidatedBlame = new Blame($blame->getPath(), $blame->getHash());
$annotatedLines = $blame->getAnnotatedLines();
$lineAccumulator = '';
foreach ($annotatedLines as $index => $currentLine) {