public function execute(array $args, $dir = null, $mustRun = false, $quiet = true, array $env = [])
    {
        // If enabled, set the working directory to the repository.
        if ($dir !== false) {
            $dir = $dir ?: $this->repositoryDir;
        }
        // Run the command.
        array_unshift($args, 'git');

        return $this->shellHelper->execute($args, $dir, $mustRun, $quiet, $env + $this->env);
    }
public function execute(array $args, $dir = null, $mustRun = false, $quiet = true, array $env = [])
    {
        // If enabled, set the working directory to the repository.
        if ($dir !== false) {
            $dir = $dir ?: $this->repositoryDir;
        }
        // Run the command.
        array_unshift($args, 'git');

        return $this->shellHelper->execute($args, $dir, $mustRun, $quiet, $env + $this->env);
    }
public function execute ( array $ args , $ dir = null , $ mustRun = false , $ quiet = true , array $ env = [ ] ) { // If enabled, set the working directory to the repository. if ( $ dir !== false ) { $ dir = $ dir ? : $ this -> repositoryDir ; } // Run the command. array_unshift ( $ args , 'git' ) ; return $ this -> shellHelper -> execute ( $ args , $ dir , $ mustRun , $ quiet , $ env + $ this -> env ) ; }
Execute a Git command.

@param string[]          $args
Command arguments (everything after 'git').
@param string|false|null $dir
The path to a Git repository. Set to false if the command should not
run inside a repository. Set to null to use the default repository.
@param bool              $mustRun
Enable exceptions if the Git command fails.
@param bool              $quiet
Suppress command output.
@param array             $env

@throws \Symfony\Component\Process\Exception\RuntimeException
If the command fails and $mustRun is enabled.

@return string|bool
The command output, true if there is no output, or false if the command
fails.
Execute a Git command .