From a6f018210466a1c7af08602fc91273090f63bc93 Mon Sep 17 00:00:00 2001 From: epriestley Date: Mon, 3 Jul 2017 07:21:27 -0700 Subject: [PATCH] Fix an issue where repositories with hyphens could sort improperly in typeaheads Summary: Fixes T12894. See that task for discussion. Test Plan: - Created repositories `abcdef`, then `abcdef-a` through `abcdef-f`. - Before patch, awkward sort order. - After patch, query for `abcdef` hits `abcdef` first. - See T12894 for details and screenshots. Reviewers: chad, amckinley Reviewed By: chad Maniphest Tasks: T12894 Differential Revision: https://secure.phabricator.com/D18179 --- .../diffusion/typeahead/DiffusionRepositoryDatasource.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/applications/diffusion/typeahead/DiffusionRepositoryDatasource.php b/src/applications/diffusion/typeahead/DiffusionRepositoryDatasource.php index 0b3f191563..e0662b1e1a 100644 --- a/src/applications/diffusion/typeahead/DiffusionRepositoryDatasource.php +++ b/src/applications/diffusion/typeahead/DiffusionRepositoryDatasource.php @@ -54,7 +54,7 @@ final class DiffusionRepositoryDatasource $parts[] = $monogram; } - $name = implode(' ', $parts); + $name = implode("\n", $parts); $vcs = $repository->getVersionControlSystem(); $vcs_type = PhabricatorRepositoryType::getNameForRepositoryType($vcs);