Преглед изворни кода

Use sha1 for branches instead of names, fixes #39

Jordi Boggiano пре 13 година
родитељ
комит
a69408e383
1 измењених фајлова са 1 додато и 1 уклоњено
  1. 1 1
      src/Packagist/WebBundle/Repository/Repository/GitHubRepository.php

+ 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;