1
0
Fork 0

Fixed unused variables.

pull/104/head
Per Bernhardt 2011-11-10 13:12:19 +01:00
parent 3e5fd85768
commit b0d2897af3
1 changed files with 2 additions and 2 deletions

View File

@ -46,7 +46,7 @@ class GitDriver implements VcsDriverInterface
if (null === $this->rootIdentifier) { if (null === $this->rootIdentifier) {
$this->rootIdentifier = 'master'; $this->rootIdentifier = 'master';
exec(sprintf('cd %s && git branch --no-color -r', escapeshellarg($this->tmpDir)), $output); exec(sprintf('cd %s && git branch --no-color -r', escapeshellarg($this->tmpDir)), $output);
foreach ($output as $key => $branch) { foreach ($output as $branch) {
if ($branch && preg_match('{/HEAD +-> +[^/]+/(\S+)}', $branch, $match)) { if ($branch && preg_match('{/HEAD +-> +[^/]+/(\S+)}', $branch, $match)) {
$this->rootIdentifier = $match[1]; $this->rootIdentifier = $match[1];
break; break;
@ -132,7 +132,7 @@ class GitDriver implements VcsDriverInterface
$branches = array(); $branches = array();
exec(sprintf('cd %s && git branch --no-color -rv', escapeshellarg($this->tmpDir)), $output); exec(sprintf('cd %s && git branch --no-color -rv', escapeshellarg($this->tmpDir)), $output);
foreach ($output as $key => $branch) { foreach ($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];