1
0
Fork 0

Fix branch extraction, fixes #565

pull/568/merge
Jordi Boggiano 2012-04-12 11:23:56 +02:00
parent b3b6b03aff
commit 273e0f777b
1 changed files with 1 additions and 1 deletions

View File

@ -168,7 +168,7 @@ class GitDriver extends VcsDriver
$this->process->execute('git branch --no-color --no-abbrev -v', $output, $this->repoDir); $this->process->execute('git branch --no-color --no-abbrev -v', $output, $this->repoDir);
foreach ($this->process->splitLines($output) as $branch) { foreach ($this->process->splitLines($output) as $branch) {
if ($branch && !preg_match('{^ *[^/]+/HEAD }', $branch)) { if ($branch && !preg_match('{^ *[^/]+/HEAD }', $branch)) {
preg_match('{^(?:\* )? *(?:[^/]+/)?(\S+) *([a-f0-9]+) .*$}', $branch, $match); preg_match('{^(?:\* )? *(?:[^/ ]+?/)?(\S+) *([a-f0-9]+) .*$}', $branch, $match);
$branches[$match[1]] = $match[2]; $branches[$match[1]] = $match[2];
} }
} }