fix situation when valid ref is a part of path

This commit is contained in:
Vitaliy Ognev
2012-12-23 14:01:26 +02:00
parent 6caecf461d
commit 412c73c509

View File

@@ -199,7 +199,7 @@ class Repository
// Otherwise, attempt to detect the ref using a list of the project's branches and tags
$valid_refs = array_merge((array) $repository->getBranches(), (array) $repository->getTags());
foreach ($valid_refs as $k => $v) {
if (!preg_match("#{$v}/#", $input)) {
if (!preg_match("#^{$v}/#", $input)) {
unset($valid_refs[$k]);
}
}