1
0
Fork 0
mirror of https://we.phorge.it/source/arcanist.git synced 2024-11-21 22:32:41 +01:00

Remove implicit sorting from "MarkerRefQuery"

Summary: Ref T13546. This is no longer necessary after the introduction of "msortv_natural()", which can handle natural string sorting.

Test Plan: Ran "arc branches", saw the same sorting applied.

Maniphest Tasks: T13546

Differential Revision: https://secure.phabricator.com/D21364
This commit is contained in:
epriestley 2020-06-17 07:51:27 -07:00
parent cd19216ea2
commit 10c4a551ae

View file

@ -104,21 +104,6 @@ abstract class ArcanistRepositoryMarkerQuery
}
}
return $this->sortMarkers($markers);
}
private function sortMarkers(array $markers) {
// Sort the list in natural order. If we apply a stable sort later,
// markers will sort in "feature1", "feature2", etc., order if they
// don't otherwise have a unique position.
// This can improve behavior if two branches were updated at the same
// time, as is common when cascading rebases after changes land.
$map = mpull($markers, 'getName');
natcasesort($map);
$markers = array_select_keys($markers, array_keys($map));
return $markers;
}