Skip to main content
Drupal API
User account menu
  • Log in

Breadcrumb

  1. Drupal Core 11.1.x
  2. FossilDriver.php

function FossilDriver::getBranches

@inheritDoc

Overrides VcsDriverInterface::getBranches

1 call to FossilDriver::getBranches()
FossilDriver::initialize in vendor/composer/composer/src/Composer/Repository/Vcs/FossilDriver.php
@inheritDoc

File

vendor/composer/composer/src/Composer/Repository/Vcs/FossilDriver.php, line 202

Class

FossilDriver
@author BohwaZ <http://bohwaz.net/&gt;

Namespace

Composer\Repository\Vcs

Code

public function getBranches() : array {
    if (null === $this->branches) {
        $branches = [];
        $this->process
            ->execute([
            'fossil',
            'branch',
            'list',
        ], $output, $this->checkoutDir);
        foreach ($this->process
            ->splitLines($output) as $branch) {
            $branch = trim(Preg::replace('/^\\*/', '', trim($branch)));
            $branches[$branch] = $branch;
        }
        $this->branches = $branches;
    }
    return $this->branches;
}
RSS feed
Powered by Drupal