Пример #1
0
 public function process()
 {
     $git = new Git($this->repository);
     $parser = new Parser();
     $currentBranch = $git->getCurrentBranch();
     $revisions = $git->getRevisions();
     $count = count($revisions);
     if ($count < 3) {
         return;
     }
     if ($this->progressHelper !== null) {
         $this->progressHelper->start($this->output, count($revisions) - 2);
     }
     for ($i = 1; $i < $count - 1; $i++) {
         $diff = $parser->parse($git->getDiff($revisions[$i - 1]['sha1'], $revisions[$i]['sha1']));
         $git->checkout($revisions[$i]['sha1']);
         $this->processRevision($revisions[$i]['sha1'], $revisions[$i]['message'], $diff, $this->findFiles());
         if ($this->progressHelper !== null) {
             $this->progressHelper->advance();
         }
     }
     $git->checkout($currentBranch);
 }