protected function Provision_PlatformGit::lsRemote in Aegir Deploy 7.3
2 calls to Provision_PlatformGit::lsRemote()
- Provision_PlatformGit::referenceIsABranch in modules/
platform_git/ drush/ Provision/ PlatformGit.php - Provision_PlatformGit::referenceIsATag in modules/
platform_git/ drush/ Provision/ PlatformGit.php
File
- modules/
platform_git/ drush/ Provision/ PlatformGit.php, line 90 - The Provision_PlatformGit class.
Class
- Provision_PlatformGit
- @file The Provision_PlatformGit class.
Code
protected function lsRemote($type = FALSE) {
if (empty($this->references)) {
$this
->notice(dt('Scanning remote git repository tags and branches.'));
$debug = drush_get_context('DRUSH_DEBUG');
drush_set_context('DRUSH_DEBUG', FALSE);
drush_shell_exec('git ls-remote ' . escapeshellarg(trim($this->repository_url)));
drush_set_context('DRUSH_DEBUG', $debug);
$lines = drush_shell_exec_output();
foreach ($lines as $line) {
$ref = explode('/', $line);
if (isset($ref[1]) && isset($ref[2])) {
$this->references[$ref[1]][] = $ref[2];
}
}
}
return $type ? $this->references[$type] : $this->references;
}