1
0
Fork 0

Fix parsing of empty git commits, fixes #3565

pull/3567/head
Jordi Boggiano 2014-12-17 15:25:22 +00:00
parent c54d6f93e3
commit e0291f3a30
1 changed files with 1 additions and 1 deletions

View File

@ -202,7 +202,7 @@ class GitDriver extends VcsDriver
$this->process->execute('git branch --no-color --no-abbrev -v', $output, $this->repoDir);
foreach ($this->process->splitLines($output) as $branch) {
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]] = $match[2];
}
}