Skip to content

Commit 70b53c4

Browse files
author
epriestley
committed
Fix an issue with viewing an undiscovered commit in Diffusion
Summary: If you load Diffusion between a repository being pulled and discovered, you can end up with a valid commit reference that hasn't been discovered yet. Don't fatal. Test Plan: Saw somewhat-helpful error page instead of fatal. Reviewers: btrahan Reviewed By: btrahan CC: aran Differential Revision: https://secure.phabricator.com/D7448
1 parent 3bf372c commit 70b53c4

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/applications/diffusion/request/DiffusionRequest.php

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -277,7 +277,9 @@ public function loadCommit() {
277277
'repositoryID = %d AND commitIdentifier = %s',
278278
$repository->getID(),
279279
$this->getCommit());
280-
$commit->attachRepository($repository);
280+
if ($commit) {
281+
$commit->attachRepository($repository);
282+
}
281283
$this->repositoryCommit = $commit;
282284
}
283285
return $this->repositoryCommit;

0 commit comments

Comments
 (0)