Exemple #1
0
 /**
  * testCommitDate
  */
 public function testCommitDate()
 {
     $outputLines = array("commit c277373174aa442af12a8e59de1812f3472c15f5", "tree c277373174aa442af12a8e59de1812f3472c15f6", "author John Doe <*****@*****.**> 1326214449 +0100", "committer Jack Doe <*****@*****.**> 1326214449 +0100", "", "    First commit");
     $mockRepo = $this->getMockRepository();
     $this->addOutputToMockRepo($mockRepo, $outputLines);
     $commit = Commit::pick($mockRepo);
     $this->doCommitTest($commit, 'c277373174aa442af12a8e59de1812f3472c15f5', 'c277373174aa442af12a8e59de1812f3472c15f6', 'John Doe', 'Jack Doe', '*****@*****.**', '*****@*****.**', '1326214449', '1326214449', 'First commit');
 }
Exemple #2
0
 /**
  * count the commit to arrive to the given treeish
  *
  * @param string $start
  *
  * @throws \RuntimeException
  * @throws \Symfony\Component\Process\Exception\RuntimeException
  * @return int|void
  */
 public function countCommits($start = 'HEAD')
 {
     $commit = Commit::pick($this, $start);
     return $commit->count();
 }