1
0
Fork 0

Backport #6312 to 1.4

pull/6568/head
Jordi Boggiano 2017-07-20 11:54:45 +02:00 committed by GitHub
parent 81f65b7a2a
commit 58bbcf7d92
1 changed files with 1 additions and 1 deletions

View File

@ -98,7 +98,7 @@ 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 FETCH_HEAD\)|\S+) *([a-f0-9]+) .*$}', $branch, $match)) {
if ($branch && preg_match('{^(?:\* ) *(\(no branch\)|\(detached from \S+\)|\(HEAD detached at \S+\)|\S+) *([a-f0-9]+) .*$}', $branch, $match)) {
if ($match[1] === '(no branch)' || substr($match[1], 0, 10) === '(detached ' || substr($match[1], 0, 17) === '(HEAD detached at') {
$version = 'dev-' . $match[2];
$prettyVersion = $version;