TQ\Git\Repository\Repository::initRepository PHP Method

initRepository() protected static method

Initializes a path to be used as a Git repository
protected static initRepository ( Binary $git, string $path, array $initArguments = null )
$git TQ\Git\Cli\Binary The Git binary
$path string The repository path
$initArguments array Arguments to pass to git-init when initializing the repository
    protected static function initRepository(Binary $git, $path, $initArguments = null)
    {
        $initArguments = $initArguments ?: array();
        /** @var $result CallResult */
        $result = $git->{'init'}($path, $initArguments);
        $result->assertSuccess(sprintf('Cannot initialize a Git repository in "%s"', $path));
    }