diff --git a/src/applications/diffusion/query/lowlevel/DiffusionLowLevelResolveRefsQuery.php b/src/applications/diffusion/query/lowlevel/DiffusionLowLevelResolveRefsQuery.php index 556ddf0904..2fc03fb739 100644 --- a/src/applications/diffusion/query/lowlevel/DiffusionLowLevelResolveRefsQuery.php +++ b/src/applications/diffusion/query/lowlevel/DiffusionLowLevelResolveRefsQuery.php @@ -204,6 +204,10 @@ final class DiffusionLowLevelResolveRefsQuery // 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 index 2af40ac930..f0f6d49c23 100644 --- a/src/applications/diffusion/request/DiffusionRequest.php +++ b/src/applications/diffusion/request/DiffusionRequest.php @@ -755,7 +755,12 @@ abstract class DiffusionRequest { 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; }