1
0
Fork 0

Fix line wrapping

pull/9187/head
Jordi Boggiano 2020-09-08 11:15:24 +02:00 committed by GitHub
parent 9dc125f79c
commit 7859fe72e8
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 5 additions and 2 deletions

View File

@ -127,8 +127,11 @@ class VersionGuesser
// find current branch and collect all branch names
foreach ($this->process->splitLines($output) as $branch) {
if ($branch && preg_match('{^(?:\* ) *(\(no branch\)|\(detached from \S+\)|\(HEAD detached at \S+\)|\S+) *([a-f0-9]+) .*$}', $branch, $match)) {
if ($match[1] === '(no branch)' || strpos($match[1], '(detached ') === 0 || strpos($match[1],
'(HEAD detached at') === 0) {
if (
$match[1] === '(no branch)'
|| strpos($match[1], '(detached ') === 0
|| strpos($match[1], '(HEAD detached at') === 0
) {
$version = 'dev-' . $match[2];
$prettyVersion = $version;
$isFeatureBranch = true;