Composer API
Class

Composer\Util\Git

class Git

Methods

__construct(IOInterface $io, Config $config, ProcessExecutor $process, Filesystem $fs)

runCommand($commandCallable, $url, $cwd, $initialClone = false)

syncMirror($url, $dir)

static  cleanEnv()

static  getGitHubDomainsRegex(Config $config)

static  sanitizeUrl($message)

string|null getVersion()

Retrieves the current git version.

Details

at line 34
public __construct(IOInterface $io, Config $config, ProcessExecutor $process, Filesystem $fs)

Parameters

IOInterface $io
Config $config
ProcessExecutor $process
Filesystem $fs

at line 42
public runCommand($commandCallable, $url, $cwd, $initialClone = false)

Parameters

$commandCallable
$url
$cwd
$initialClone

at line 203
public syncMirror($url, $dir)

Parameters

$url
$dir

at line 253
static public cleanEnv()

at line 285
static public getGitHubDomainsRegex(Config $config)

Parameters

Config $config

at line 290
static public sanitizeUrl($message)

Parameters

$message

at line 318
public string|null getVersion()

Retrieves the current git version.

Return Value

string|null The git version number.