예제 #1
0
 /**
  * @return Diff
  */
 public function getDiff()
 {
     $args = array('-r', '-p', '-m', '-M', '--no-commit-id', '--full-index', $this->revision);
     $diff = Diff::parse($this->repository->run('diff-tree', $args));
     $diff->setRepository($this->repository);
     return $diff;
 }
예제 #2
0
파일: Commit.php 프로젝트: gitiki/gitiki
 /**
  * @param string $file Path to file
  *
  * @return Diff
  */
 public function getDiffFile($file)
 {
     $args = ['-r', '-p', '-m', '-M', '--no-commit-id', '--full-index', $this->revision, '--', $this->repository->getWikiDir() . $file];
     $diff = Diff::parse($this->repository->run('diff-tree', $args));
     $diff->setRepository($this->repository);
     return $diff;
 }
예제 #3
0
파일: Repository.php 프로젝트: beubi/gitlib
 /**
  * @return Diff
  */
 public function getDiff($revisions)
 {
     if (null !== $revisions && !$revisions instanceof RevisionList) {
         $revisions = new RevisionList($this, $revisions);
     }
     $args = array_merge(array('-r', '-p', '-m', '-M', '--no-commit-id', '--full-index'), $revisions->getAsTextArray());
     $diff = Diff::parse($this->run('diff', $args));
     $diff->setRepository($this);
     return $diff;
 }
예제 #4
0
 /**
  * @param string $rawDiff
  *
  * @return FilesCollection
  */
 public function locateFromRawDiffInput($rawDiff)
 {
     $diff = Diff::parse($rawDiff);
     $diff->setRepository($this->repository);
     return $this->parseFilesFromDiff($diff);
 }
 public function getDiffStaged()
 {
     $diff = Diff::parse($this->run('diff', array('-r', '-p', '-m', '-M', '--full-index', '--staged')));
     $diff->setRepository($this->repository);
     return $diff;
 }