OXIESEC PANEL
- Current Dir:
/
/
usr
/
share
/
php
/
Composer
/
Repository
/
Vcs
Server IP: 139.59.38.164
Upload:
Create Dir:
Name
Size
Modified
Perms
📁
..
-
07/20/2024 06:32:22 AM
rwxr-xr-x
📄
BitbucketDriver.php
12.69 KB
01/31/2018 03:28:18 PM
rw-r--r--
📄
FossilDriver.php
6.98 KB
01/31/2018 03:28:18 PM
rw-r--r--
📄
GitBitbucketDriver.php
2.32 KB
01/31/2018 03:28:18 PM
rw-r--r--
📄
GitDriver.php
6.44 KB
01/31/2018 03:28:18 PM
rw-r--r--
📄
GitHubDriver.php
16.92 KB
01/31/2018 03:28:18 PM
rw-r--r--
📄
GitLabDriver.php
14.68 KB
01/31/2018 03:28:18 PM
rw-r--r--
📄
HgBitbucketDriver.php
2.32 KB
01/31/2018 03:28:18 PM
rw-r--r--
📄
HgDriver.php
6.87 KB
01/31/2018 03:28:18 PM
rw-r--r--
📄
PerforceDriver.php
3.61 KB
01/31/2018 03:28:18 PM
rw-r--r--
📄
SvnDriver.php
11.26 KB
01/31/2018 03:28:18 PM
rw-r--r--
📄
VcsDriver.php
4.84 KB
01/31/2018 03:28:18 PM
rw-r--r--
📄
VcsDriverInterface.php
3.12 KB
01/31/2018 03:28:18 PM
rw-r--r--
Editing: GitBitbucketDriver.php
Close
<?php /* * This file is part of Composer. * * (c) Nils Adermann <naderman@naderman.de> * Jordi Boggiano <j.boggiano@seld.be> * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ namespace Composer\Repository\Vcs; use Composer\Config; use Composer\IO\IOInterface; /** * @author Per Bernhardt <plb@webfactory.de> */ class GitBitbucketDriver extends BitbucketDriver { /** * {@inheritDoc} */ public function getRootIdentifier() { if ($this->fallbackDriver) { return $this->fallbackDriver->getRootIdentifier(); } if (null === $this->rootIdentifier) { if (! $this->getRepoData()) { return $this->fallbackDriver->getRootIdentifier(); } if ($this->vcsType !== 'git') { throw new \RuntimeException( $this->url.' does not appear to be a git repository, use '. $this->cloneHttpsUrl.' if this is a mercurial bitbucket repository' ); } $mainBranchData = $this->getMainBranchData(); $this->rootIdentifier = !empty($mainBranchData['name']) ? $mainBranchData['name'] : 'master'; } return $this->rootIdentifier; } /** * {@inheritDoc} */ public static function supports(IOInterface $io, Config $config, $url, $deep = false) { if (!preg_match('#^https?://bitbucket\.org/([^/]+)/(.+?)\.git$#', $url)) { return false; } if (!extension_loaded('openssl')) { $io->writeError('Skipping Bitbucket git driver for '.$url.' because the OpenSSL PHP extension is missing.', true, IOInterface::VERBOSE); return false; } return true; } /** * {@inheritdoc} */ protected function setupFallbackDriver($url) { $this->fallbackDriver = new GitDriver( array('url' => $url), $this->io, $this->config, $this->process, $this->remoteFilesystem ); $this->fallbackDriver->initialize(); } /** * {@inheritdoc} */ protected function generateSshUrl() { return 'git@' . $this->originUrl . ':' . $this->owner.'/'.$this->repository.'.git'; } }