Ejemplo n.º 1
0
 /**
  * @param $hash
  *
  * @return $this
  */
 public function setHash($hash)
 {
     $hash = trim($hash);
     $output = $this->exec('show ' . $hash . ' --quiet --format=medium');
     $output = Git::parseGitLogOutput($output);
     if (!$output) {
         throw new \RuntimeException("{$hash} doesn't seem to be a valid revision.");
     }
     $this->hash = $output[0];
     $this->author = $output[1];
     $this->date = $output[2];
     $this->message = $output[3];
     return $this;
 }