Fix handling of branches with slashes, fixes #1748
parent
5cd2249898
commit
6c9bc2824e
|
@ -183,7 +183,7 @@ class RootPackageLoader extends ArrayLoader
|
|||
|
||||
// find current branch and collect all branch names
|
||||
foreach ($this->process->splitLines($output) as $branch) {
|
||||
if ($branch && preg_match('{^(?:\* ) *(?:[^/ ]+?/)?(\S+|\(no branch\)) *([a-f0-9]+) .*$}', $branch, $match)) {
|
||||
if ($branch && preg_match('{^(?:\* ) *(\S+|\(no branch\)) *([a-f0-9]+) .*$}', $branch, $match)) {
|
||||
if ($match[1] === '(no branch)') {
|
||||
$version = 'dev-'.$match[2];
|
||||
$isFeatureBranch = true;
|
||||
|
@ -197,7 +197,7 @@ class RootPackageLoader extends ArrayLoader
|
|||
}
|
||||
|
||||
if ($branch && !preg_match('{^ *[^/]+/HEAD }', $branch)) {
|
||||
if (preg_match('{^(?:\* )? *(?:[^/ ]+?/)?(\S+) *([a-f0-9]+) .*$}', $branch, $match)) {
|
||||
if (preg_match('{^(?:\* )? *(\S+) *([a-f0-9]+) .*$}', $branch, $match)) {
|
||||
$branches[] = $match[1];
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue