From b3c465d55a78d645f1063b82f46fbf4aa2566a0f Mon Sep 17 00:00:00 2001 From: Nils Adermann Date: Wed, 7 Oct 2020 15:10:20 +0200 Subject: [PATCH] VersionGuesser: local branches still need to be considered --- src/Composer/Package/Version/VersionGuesser.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Composer/Package/Version/VersionGuesser.php b/src/Composer/Package/Version/VersionGuesser.php index fd8dd7a91..072a53dfa 100644 --- a/src/Composer/Package/Version/VersionGuesser.php +++ b/src/Composer/Package/Version/VersionGuesser.php @@ -142,7 +142,7 @@ class VersionGuesser } if ($branch && !preg_match('{^ *.+/HEAD }', $branch)) { - if (preg_match('{^(?:\* )? *((?:remotes/(?:origin|upstream)/)[^\s/]+) *([a-f0-9]+) .*$}', $branch, $match)) { + if (preg_match('{^(?:\* )? *((?:remotes/(?:origin|upstream)/)?[^\s/]+) *([a-f0-9]+) .*$}', $branch, $match)) { $branches[] = $match[1]; } }