1
0
Fork 0

Fix handling of branches with slashes, fixes #1748

pull/1743/merge
Jordi Boggiano 2013-03-31 12:35:42 +02:00
parent 5cd2249898
commit 6c9bc2824e
1 changed files with 2 additions and 2 deletions

View File

@ -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];
}
}