public function getRepo(BundleEntity $bundle)
{
if ($this->hasRepo($bundle)) {
$dir = $this->getRepoDir($bundle);
$repo = new PHPGit_Repository($dir, false, array('git_executable' => $this->gitExecutable));
} else {
$repo = $this->createGitRepo($bundle);
}
return new Repo($bundle, $repo);
}