getGitDir() public method

Returns the directory containing git files (git-dir).
public getGitDir ( ) : string
return string
Exemplo n.º 1
0
 public static function registerDeletion(Repository $repository)
 {
     register_shutdown_function(function () use($repository) {
         if ($repository->getWorkingDir()) {
             $dir = $repository->getWorkingDir();
         } else {
             $dir = $repository->getGitDir();
         }
         AbstractTest::deleteDir($dir);
     });
 }
Exemplo n.º 2
0
 /**
  * Injects Logger inside the repository.
  */
 public function addRepository(Repository $repository)
 {
     if (null !== $repository->getLogger()) {
         throw new \RuntimeException('A logger is already injected in repository.');
     }
     $name = $repository->getGitDir();
     $logger = new Logger($name);
     $handler = new TestHandler();
     $logger->pushHandler($handler);
     $this->handlers[$name] = $handler;
     $repository->setLogger($logger);
 }