Changeset View
Changeset View
Standalone View
Standalone View
src/applications/repository/daemon/PhabricatorGitGraphStream.php
| Show All 13 Lines | public function __construct( | ||||
| PhabricatorRepository $repository, | PhabricatorRepository $repository, | ||||
| $start_commit = null) { | $start_commit = null) { | ||||
| $this->repository = $repository; | $this->repository = $repository; | ||||
| $this->startCommit = $start_commit; | $this->startCommit = $start_commit; | ||||
| if ($start_commit !== null) { | if ($start_commit !== null) { | ||||
| $future = $repository->getLocalCommandFuture( | $future = $repository->getLocalCommandFuture( | ||||
| 'log --format=%s %s --', | 'log %s %s --', | ||||
| '%H%x01%P%x01%ct', | '--format=%H%x01%P%x01%ct', | ||||
| $start_commit); | gitsprintf('%s', $start_commit)); | ||||
| } else { | } else { | ||||
| $future = $repository->getLocalCommandFuture( | $future = $repository->getLocalCommandFuture( | ||||
| 'log --format=%s --all --', | 'log %s --all --', | ||||
| '%H%x01%P%x01%ct'); | '--format=%H%x01%P%x01%ct'); | ||||
| } | } | ||||
| $this->iterator = new LinesOfALargeExecFuture($future); | $this->iterator = new LinesOfALargeExecFuture($future); | ||||
| $this->iterator->setDelimiter("\n"); | $this->iterator->setDelimiter("\n"); | ||||
| $this->iterator->rewind(); | $this->iterator->rewind(); | ||||
| } | } | ||||
| public function getParents($commit) { | public function getParents($commit) { | ||||
| ▲ Show 20 Lines • Show All 69 Lines • Show Last 20 Lines | |||||