1
0
Fork 0

Improve regex in \Composer\Downloader\SvnDownloader::getCommitLogs() by removing unnecessary greedy operator

pull/8865/head
Ayesh Karunaratne 2020-05-04 00:50:53 +07:00
parent d4c8478df5
commit aa20413990
No known key found for this signature in database
GPG Key ID: 2CA18B2097A7429A
1 changed files with 1 additions and 1 deletions

View File

@ -178,7 +178,7 @@ class SvnDownloader extends VcsDownloader
*/
protected function getCommitLogs($fromReference, $toReference, $path)
{
if (preg_match('{.*@(\d+)$}', $fromReference) && preg_match('{.*@(\d+)$}', $toReference)) {
if (preg_match('{@(\d+)$}', $fromReference) && preg_match('{@(\d+)$}', $toReference)) {
// retrieve the svn base url from the checkout folder
$command = sprintf('svn info --non-interactive --xml %s', ProcessExecutor::escape($path));
if (0 !== $this->process->execute($command, $output, $path)) {