function GitDownloader::getCommitLogs
@inheritDoc
Overrides VcsDownloader::getCommitLogs
File
-
vendor/
composer/ composer/ src/ Composer/ Downloader/ GitDownloader.php, line 535
Class
- GitDownloader
- @author Jordi Boggiano <j.boggiano@seld.be>
Namespace
Composer\DownloaderCode
protected function getCommitLogs(string $fromReference, string $toReference, string $path) : string {
$path = $this->normalizePath($path);
$command = array_merge([
'git',
'log',
$fromReference . '..' . $toReference,
'--pretty=format:%h - %an: %s',
], GitUtil::getNoShowSignatureFlags($this->process));
if (0 !== $this->process
->execute($command, $output, $path)) {
throw new \RuntimeException('Failed to execute ' . implode(' ', $command) . "\n\n" . $this->process
->getErrorOutput());
}
return $output;
}