Exemple #1
0
 /**
  * @param int $maxCount
  *
  * @return CommitMetadata[]
  *
  * @throws GitException
  */
 public function getHistory($maxCount)
 {
     try {
         return $this->gitRepository->getWorkingCopyHistory($maxCount);
     } catch (GitException $e) {
         if ($e->getMessage() === "fatal: bad default revision 'HEAD'\n") {
             /* swallow, history not there yet */
             return [];
         } else {
             throw $e;
         }
     }
 }