From e9560a619e3bcda8741631e4387c0534ed2d7da1 Mon Sep 17 00:00:00 2001 From: Jordi Boggiano Date: Mon, 10 Jun 2024 22:41:26 +0200 Subject: [PATCH] Revert issue in previous fix --- src/Composer/Package/Version/VersionGuesser.php | 2 +- tests/Composer/Test/Package/Version/VersionGuesserTest.php | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/Composer/Package/Version/VersionGuesser.php b/src/Composer/Package/Version/VersionGuesser.php index 06c828675..533de2fa6 100644 --- a/src/Composer/Package/Version/VersionGuesser.php +++ b/src/Composer/Package/Version/VersionGuesser.php @@ -176,7 +176,7 @@ class VersionGuesser $featurePrettyVersion = $prettyVersion; // try to find the best (nearest) version branch to assume this feature's version - $result = $this->guessFeatureVersion($packageConfig, $version, $branches, 'git rev-list -- %candidate%..%branch%', $path, '%candidate%..%branch%'); + $result = $this->guessFeatureVersion($packageConfig, $version, $branches, 'git rev-list %candidate%..%branch%', $path, '%candidate%..%branch%'); $version = $result['version']; $prettyVersion = $result['pretty_version']; } diff --git a/tests/Composer/Test/Package/Version/VersionGuesserTest.php b/tests/Composer/Test/Package/Version/VersionGuesserTest.php index d8952d4b7..292c78946 100644 --- a/tests/Composer/Test/Package/Version/VersionGuesserTest.php +++ b/tests/Composer/Test/Package/Version/VersionGuesserTest.php @@ -121,7 +121,7 @@ class VersionGuesserTest extends TestCase 'stdout' => " arbitrary $commitHash Commit message\n* feature $anotherCommitHash Another message\n", ), array( - 'cmd' => 'git rev-list -- arbitrary..feature', + 'cmd' => 'git rev-list arbitrary..feature', 'stdout' => "$anotherCommitHash\n", ), ), true); @@ -151,7 +151,7 @@ class VersionGuesserTest extends TestCase 'stdout' => " latest-testing $commitHash Commit message\n* feature $anotherCommitHash Another message\n", ), array( - 'cmd' => 'git rev-list -- latest-testing..feature', + 'cmd' => 'git rev-list latest-testing..feature', 'stdout' => "$anotherCommitHash\n", ), ), true); @@ -364,7 +364,7 @@ class VersionGuesserTest extends TestCase "remotes/origin/1.5 03a15d220da53c52eddd5f32ffca64a7b3801bea Commit message\n", ), array( - 'cmd' => 'git rev-list -- remotes/origin/1.5..feature-branch', + 'cmd' => 'git rev-list remotes/origin/1.5..feature-branch', 'stdout' => "\n", ), ), true);