diff --git a/src/applications/diffusion/query/lowlevel/DiffusionLowLevelResolveRefsQuery.php b/src/applications/diffusion/query/lowlevel/DiffusionLowLevelResolveRefsQuery.php --- a/src/applications/diffusion/query/lowlevel/DiffusionLowLevelResolveRefsQuery.php +++ b/src/applications/diffusion/query/lowlevel/DiffusionLowLevelResolveRefsQuery.php @@ -204,6 +204,10 @@ // unclear how to best do that. For now, treat it as a miss instead. continue; } + if (preg_match('/unknown revision/', $ex->getStdErr())) { + // No matches for this ref. + continue; + } throw $ex; } diff --git a/src/applications/diffusion/request/DiffusionRequest.php b/src/applications/diffusion/request/DiffusionRequest.php --- a/src/applications/diffusion/request/DiffusionRequest.php +++ b/src/applications/diffusion/request/DiffusionRequest.php @@ -755,7 +755,12 @@ public function getRefAlternatives() { // Make sure we've resolved the reference into a stable commit first. - $this->getStableCommit(); + try { + $this->getStableCommit(); + } catch (DiffusionRefNotFoundException $ex) { + // If we have a bad reference, just return the empty set of + // alternatives. + } return $this->refAlternatives; }