* @return Repository Instance of Repository
*/
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 run($repository, $command)
{
if (version_compare($this->getVersion(), '1.7.2', '>=')) {
$command = '-c "color.ui"=false ' . $command;
}
$command = $this->getPath() . ' ' . $command;
// echo $command;