Jordi Boggiano 8 năm trước cách đây
mục cha
commit
b6778cd7f6
1 tập tin đã thay đổi với 5 bổ sung5 xóa
  1. 5 5
      src/Composer/Repository/Vcs/BitbucketDriver.php

+ 5 - 5
src/Composer/Repository/Vcs/BitbucketDriver.php

@@ -321,13 +321,13 @@ abstract class BitbucketDriver extends VcsDriver
             );
             $hasNext = true;
             while ($hasNext) {
-                // skip headless branches which seem to be deleted branches that bitbucket nevertheless returns in the API
-                if ($this->vcsType === 'hg' && empty($data['heads'])) {
-                    continue;
-                }
-
                 $branchData = JsonFile::parseJson($this->getContentsWithOAuthCredentials($resource), $resource);
                 foreach ($branchData['values'] as $data) {
+                    // skip headless branches which seem to be deleted branches that bitbucket nevertheless returns in the API
+                    if ($this->vcsType === 'hg' && empty($data['heads'])) {
+                        continue;
+                    }
+
                     $this->branches[$data['name']] = $data['target']['hash'];
                 }
                 if (empty($branchData['next'])) {