mirror of
https://we.phorge.it/source/phorge.git
synced 2024-11-23 07:12:41 +01:00
Run a commit discovery daemon only once
Summary: Discover commits then return; useful when initializing new repositories in unit tests. By which I mean "when initializing a new repository in my unit test that I'm working on". Test Plan: Using this in a PhabricatorTestCase. Reviewers: epriestley, aran Reviewed By: epriestley CC: aran, edward, epriestley Differential Revision: 948
This commit is contained in:
parent
9d4793b27f
commit
6737ae4828
1 changed files with 5 additions and 0 deletions
|
@ -36,6 +36,11 @@ abstract class PhabricatorRepositoryCommitDiscoveryDaemon
|
|||
}
|
||||
}
|
||||
|
||||
final public function runOnce() {
|
||||
$this->repository = $this->loadRepository();
|
||||
$this->discoverCommits();
|
||||
}
|
||||
|
||||
protected function isKnownCommit($target) {
|
||||
if (isset($this->commitCache[$target])) {
|
||||
return true;
|
||||
|
|
Loading…
Reference in a new issue