mirror of
https://github.com/klaussilveira/gitlist.git
synced 2025-11-17 19:20:56 +01:00
should take 1st match
This commit is contained in:
@@ -207,7 +207,7 @@ class Repository
|
|||||||
// No exact ref match, so just try our best
|
// No exact ref match, so just try our best
|
||||||
if (count($valid_refs) > 1) {
|
if (count($valid_refs) > 1) {
|
||||||
preg_match('/([^\/]+)(.*)/', $input, $matches);
|
preg_match('/([^\/]+)(.*)/', $input, $matches);
|
||||||
$branch = preg_replace('/^\/|\/$/', '', $matches[0]);
|
$branch = preg_replace('/^\/|\/$/', '', $matches[1]);
|
||||||
} else {
|
} else {
|
||||||
// Extract branch name
|
// Extract branch name
|
||||||
$branch = array_shift($valid_refs);
|
$branch = array_shift($valid_refs);
|
||||||
|
|||||||
Reference in New Issue
Block a user