1
0
Fork 0
mirror of https://we.phorge.it/source/phorge.git synced 2025-01-02 02:40:58 +01:00

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
This commit is contained in:
epriestley 2013-10-30 13:06:15 -07:00
parent 3bf372c60c
commit 70b53c49fd

View file

@ -277,7 +277,9 @@ abstract class DiffusionRequest {
'repositoryID = %d AND commitIdentifier = %s',
$repository->getID(),
$this->getCommit());
$commit->attachRepository($repository);
if ($commit) {
$commit->attachRepository($repository);
}
$this->repositoryCommit = $commit;
}
return $this->repositoryCommit;