When I cherry-picked in this change I rewrote the comparator, and messed up the ordering of the compare for the distance between two regex patterns. We want the most specific first, and that would have a lower distance from the reference name. Bug: issue 650 Change-Id: I25331274a015b33e3be04ec11e3197750801176c CC: Carlos Eduardo Baldacin Signed-off-by: Shawn O. Pearce <sop@google.com>