diff --git a/src/applications/diffusion/controller/DiffusionExternalController.php b/src/applications/diffusion/controller/DiffusionExternalController.php index 8ae8dcdba1..ea1bc24ae2 100644 --- a/src/applications/diffusion/controller/DiffusionExternalController.php +++ b/src/applications/diffusion/controller/DiffusionExternalController.php @@ -60,6 +60,7 @@ final class DiffusionExternalController extends DiffusionController { array( 'action' => 'browse', 'callsign' => $repository->getCallsign(), + 'branch' => $repository->getDefaultBranch(), 'commit' => $id, )); return id(new AphrontRedirectResponse())->setURI($redirect); @@ -88,11 +89,12 @@ final class DiffusionExternalController extends DiffusionController { "Diffusion does not know about.
"); } else if (count($commits) == 1) { $commit = head($commits); + $repo = $repositories[$commit->getRepositoryID()]; $redirect = DiffusionRequest::generateDiffusionURI( array( 'action' => 'browse', - 'callsign' => $repositories[$commit->getRepositoryID()] - ->getCallsign(), + 'callsign' => $repo->getCallsign(), + 'branch' => $repo->getDefaultBranch(), 'commit' => $commit->getCommitIdentifier(), )); return id(new AphrontRedirectResponse())->setURI($redirect); @@ -105,6 +107,7 @@ final class DiffusionExternalController extends DiffusionController { array( 'action' => 'browse', 'callsign' => $repo->getCallsign(), + 'branch' => $repo->getDefaultBranch(), 'commit' => $commit->getCommitIdentifier(), )); $rows[] = array( diff --git a/src/applications/owners/controller/PhabricatorOwnersDetailController.php b/src/applications/owners/controller/PhabricatorOwnersDetailController.php index e0992e99ad..59b541dd50 100644 --- a/src/applications/owners/controller/PhabricatorOwnersDetailController.php +++ b/src/applications/owners/controller/PhabricatorOwnersDetailController.php @@ -101,8 +101,9 @@ final class PhabricatorOwnersDetailController $href = DiffusionRequest::generateDiffusionURI( array( 'callsign' => $repo->getCallsign(), - 'path' => $path->getPath(), - 'action' => 'browse' + 'branch' => $repo->getDefaultBranch(), + 'path' => $path->getPath(), + 'action' => 'browse' )); $repo_name = ''.phutil_escape_html($repo->getName()). ''; diff --git a/src/applications/owners/controller/PhabricatorOwnersListController.php b/src/applications/owners/controller/PhabricatorOwnersListController.php index 6ac24112c6..1a501bcff2 100644 --- a/src/applications/owners/controller/PhabricatorOwnersListController.php +++ b/src/applications/owners/controller/PhabricatorOwnersListController.php @@ -265,6 +265,7 @@ final class PhabricatorOwnersListController $href = DiffusionRequest::generateDiffusionURI( array( 'callsign' => $repo->getCallsign(), + 'branch' => $repo->getDefaultBranch(), 'path' => $path->getPath(), 'action' => 'browse', ));