Sort repository regex paths by longest first

This commit is contained in:
Christian Schorn
2012-10-31 14:44:45 +01:00
parent f3fa152ecc
commit 3c9205a079

View File

@@ -25,6 +25,7 @@ class Routing
},
$this->app['git']->getRepositories($this->app['git.repos'])
);
usort($quoted_paths, function ($a, $b) { return strlen($b) - strlen($a); });
$regex = implode('|', $quoted_paths);
}