From aa2041399079a82280a96ed5515d1f51557c4eaf Mon Sep 17 00:00:00 2001 From: Ayesh Karunaratne Date: Mon, 4 May 2020 00:50:53 +0700 Subject: [PATCH] Improve regex in \Composer\Downloader\SvnDownloader::getCommitLogs() by removing unnecessary greedy operator --- src/Composer/Downloader/SvnDownloader.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Composer/Downloader/SvnDownloader.php b/src/Composer/Downloader/SvnDownloader.php index 0281862b5..634c4a7d5 100644 --- a/src/Composer/Downloader/SvnDownloader.php +++ b/src/Composer/Downloader/SvnDownloader.php @@ -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)) {