Browse Source

Use sha1 for branches instead of names, fixes #39

Jordi Boggiano 13 years ago
parent
commit
a69408e383

+ 1 - 1
src/Packagist/WebBundle/Repository/Repository/GitHubRepository.php

@@ -60,7 +60,7 @@ class GitHubRepository implements RepositoryInterface
         $attempts = 3;
 
         while ($attempts--) {
-            $label = array_search($identifier, (array) $this->tags) ?: array_search($identifier, (array) $this->branches) ?: $identifier;
+            $label = array_search($identifier, (array) $this->tags) ?: $identifier;
             $url = 'https://github.com/'.$this->owner.'/'.$this->repository.'/zipball/'.$label;
             if (!$checksum = @hash_file('sha1', $url)) {
                 continue;