private function runGitCommand($command)
    {
        $path = dirname($this->file);
        $process = new Process($command, $path);

        if (0 === $process->run()) {
            return trim($process->getOutput());
        }

        throw new RuntimeException(
            sprintf(
                'The tag or commit hash could not be retrieved from "%s": %s',
                $path,
                $process->getErrorOutput()
            )
        );
    }
private function runGitCommand($command)
    {
        $path = dirname($this->file);
        $process = new Process($command, $path);

        if (0 === $process->run()) {
            return trim($process->getOutput());
        }

        throw new RuntimeException(
            sprintf(
                'The tag or commit hash could not be retrieved from "%s": %s',
                $path,
                $process->getErrorOutput()
            )
        );
    }
private function runGitCommand ( $ command ) { $ path = dirname ( $ this -> file ) ; $ process = new Process ( $ command , $ path ) ; if ( 0 === $ process -> run ( ) ) { return trim ( $ process -> getOutput ( ) ) ; } throw new RuntimeException ( sprintf ( 'The tag or commit hash could not be retrieved from "%s": %s' , $ path , $ process -> getErrorOutput ( ) ) ) ; }
Runs a Git command on the repository.

@param string $command The command.

@return string The trimmed output from the command.

@throws RuntimeException If the command failed.
Runs a Git command on the repository .