summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorMatija Čupić <matteeyah@gmail.com>2018-11-20 14:56:43 +0100
committerMatija Čupić <matteeyah@gmail.com>2018-12-08 19:28:55 +0100
commitd12bc3bfc47f9a4252e3f9eb60b1326eade7d3e5 (patch)
treed0dd3e85c569c57ec6b0cb7c5aed340f013ec1a0 /lib
parente0b5306cb79c7a535f96c0d2d864278b2193d641 (diff)
downloadgitlab-ce-d12bc3bfc47f9a4252e3f9eb60b1326eade7d3e5.tar.gz
Search for tag / branch ref from beginning
Diffstat (limited to 'lib')
-rw-r--r--lib/gitlab/git.rb4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/gitlab/git.rb b/lib/gitlab/git.rb
index 81ec0e9f2db..44a62586a23 100644
--- a/lib/gitlab/git.rb
+++ b/lib/gitlab/git.rb
@@ -54,11 +54,11 @@ module Gitlab
end
def tag_ref?(ref)
- ref =~ /#{TAG_REF_PREFIX}.+/
+ ref =~ /^#{TAG_REF_PREFIX}.+/
end
def branch_ref?(ref)
- ref =~ /#{BRANCH_REF_PREFIX}.+/
+ ref =~ /^#{BRANCH_REF_PREFIX}.+/
end
def blank_ref?(ref)