Skip to content

Commit

Permalink
support bitbucket URLs with plain http
Browse files Browse the repository at this point in the history
  • Loading branch information
Seldaek committed Jan 19, 2015
1 parent f115bd5 commit 2a1a963
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions src/Composer/Repository/Vcs/GitBitbucketDriver.php
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ class GitBitbucketDriver extends VcsDriver implements VcsDriverInterface
*/
public function initialize()
{
preg_match('#^https://bitbucket\.org/([^/]+)/(.+?)\.git$#', $this->url, $match);
preg_match('#^https?://bitbucket\.org/([^/]+)/(.+?)\.git$#', $this->url, $match);
$this->owner = $match[1];
$this->repository = $match[2];
$this->originUrl = 'bitbucket.org';
Expand Down Expand Up @@ -143,7 +143,7 @@ public function getBranches()
*/
public static function supports(IOInterface $io, Config $config, $url, $deep = false)
{
if (!preg_match('#^https://bitbucket\.org/([^/]+)/(.+?)\.git$#', $url)) {
if (!preg_match('#^https?://bitbucket\.org/([^/]+)/(.+?)\.git$#', $url)) {
return false;
}

Expand Down
4 changes: 2 additions & 2 deletions src/Composer/Repository/Vcs/HgBitbucketDriver.php
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ class HgBitbucketDriver extends VcsDriver
*/
public function initialize()
{
preg_match('#^https://bitbucket\.org/([^/]+)/([^/]+)/?$#', $this->url, $match);
preg_match('#^https?://bitbucket\.org/([^/]+)/([^/]+)/?$#', $this->url, $match);
$this->owner = $match[1];
$this->repository = $match[2];
$this->originUrl = 'bitbucket.org';
Expand Down Expand Up @@ -153,7 +153,7 @@ public function getBranches()
*/
public static function supports(IOInterface $io, Config $config, $url, $deep = false)
{
if (!preg_match('#^https://bitbucket\.org/([^/]+)/([^/]+)/?$#', $url)) {
if (!preg_match('#^https?://bitbucket\.org/([^/]+)/([^/]+)/?$#', $url)) {
return false;
}

Expand Down

0 comments on commit 2a1a963

Please sign in to comment.