src/In2pire/Compiler/Component/Git.php
public static function findGitRepository($directory)
    {
        $process = new Process('git rev-parse --show-toplevel', $directory);
        $process->run();

        if (!$process->isSuccessful()) {
            return false;
        }

        $rootPath = trim($process->getOutput());
        return new Git($rootPath);
    }
public static function findGitRepository($directory)
    {
        $process = new Process('git rev-parse --show-toplevel', $directory);
        $process->run();

        if (!$process->isSuccessful()) {
            return false;
        }

        $rootPath = trim($process->getOutput());
        return new Git($rootPath);
    }
public static function findGitRepository ( $ directory ) { $ process = new Process ( 'git rev-parse --show-toplevel' , $ directory ) ; $ process -> run ( ) ; if ( ! $ process -> isSuccessful ( ) ) { return false ; } $ rootPath = trim ( $ process -> getOutput ( ) ) ; return new Git ( $ rootPath ) ; }
Find a git repository.

@return mixed
Git object or false.
Find a git repository .