From b6778cd7f67f13ed5c1ab19bd5d2e25e2138e0d5 Mon Sep 17 00:00:00 2001 From: Jordi Boggiano Date: Fri, 14 Apr 2017 00:25:14 +0200 Subject: [PATCH] Oops --- src/Composer/Repository/Vcs/BitbucketDriver.php | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/Composer/Repository/Vcs/BitbucketDriver.php b/src/Composer/Repository/Vcs/BitbucketDriver.php index 7fc137c44..bf60cda0e 100644 --- a/src/Composer/Repository/Vcs/BitbucketDriver.php +++ b/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'])) {