public function getRepository($path)
    {
        if (!file_exists($path) || !file_exists($path . '/.git/HEAD') && !file_exists($path . '/HEAD')) {
            throw new \RuntimeException('There is no GIT repository at ' . $path);
        }

        return new Repository($path, $this);
    }
public function getRepository($path)
    {
        if (!file_exists($path) || !file_exists($path . '/.git/HEAD') && !file_exists($path . '/HEAD')) {
            throw new \RuntimeException('There is no GIT repository at ' . $path);
        }

        return new Repository($path, $this);
    }
public function getRepository ( $ path ) { if ( ! file_exists ( $ path ) || ! file_exists ( $ path . '/.git/HEAD' ) && ! file_exists ( $ path . '/HEAD' ) ) { throw new \ RuntimeException ( 'There is no GIT repository at ' . $ path ) ; } return new Repository ( $ path , $ this ) ; }
Opens a repository at the specified path.

@param  string     $path Path where the repository is located

@return Repository Instance of Repository
Opens a repository at the specified path .