Summary: This is pretty lame but I didn't have a better idea.
Test Plan:
$ arc test # previously translated as list
$ arc lst
$ arc brnach
Reviewers: epriestley
Reviewed By: epriestley
CC: aran, Korvin
Differential Revision: https://secure.phabricator.com/D4773
asort($distances);
$best = min($max_distance, reset($distances));
foreach ($distances as $option => $distance) {
- if ($distance > $best) {
+ if ($distance > $best || strlen($option) <= 2 * $distance) {
unset($distances[$option]);
}
}