From bc153ea78b74bd66bb36eaf5550b14b85b055203 Mon Sep 17 00:00:00 2001 From: Jordi Boggiano Date: Mon, 6 Jan 2014 19:20:03 +0100 Subject: [PATCH] Clean up var name --- src/Composer/Downloader/GitDownloader.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/Composer/Downloader/GitDownloader.php b/src/Composer/Downloader/GitDownloader.php index 1b41fbc07..81030580f 100644 --- a/src/Composer/Downloader/GitDownloader.php +++ b/src/Composer/Downloader/GitDownloader.php @@ -216,7 +216,7 @@ class GitDownloader extends VcsDownloader $gitRef = $reference; if (!preg_match('{^[a-f0-9]{40}$}', $reference) && $branches - && preg_match('{^\s+composer/'.preg_quote($reference).'$}m', $output) + && preg_match('{^\s+composer/'.preg_quote($reference).'$}m', $branches) ) { $command = sprintf('git checkout -B %s %s && git reset --hard %2$s', escapeshellarg($branch), escapeshellarg('composer/'.$reference)); if (0 === $this->process->execute($command, $output, $path)) { @@ -360,6 +360,7 @@ class GitDownloader extends VcsDownloader preg_match('{(https?://)([^/]+)(.*)$}i', $url, $match) && strpos($this->process->getErrorOutput(), 'fatal: Authentication failed') !== false ) { + // TODO this should use an auth manager class that prompts and stores in the config if ($this->io->hasAuthentication($match[2])) { $auth = $this->io->getAuthentication($match[2]); } else {