瀏覽代碼

Fix branch extraction, fixes #565

Jordi Boggiano 13 年之前
父節點
當前提交
273e0f777b
共有 1 個文件被更改,包括 1 次插入1 次删除
  1. 1 1
      src/Composer/Repository/Vcs/GitDriver.php

+ 1 - 1
src/Composer/Repository/Vcs/GitDriver.php

@@ -168,7 +168,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)) {
-                    preg_match('{^(?:\* )? *(?:[^/]+/)?(\S+) *([a-f0-9]+) .*$}', $branch, $match);
+                    preg_match('{^(?:\* )? *(?:[^/ ]+?/)?(\S+) *([a-f0-9]+) .*$}', $branch, $match);
                     $branches[$match[1]] = $match[2];
                 }
             }