summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatija Čupić <matteeyah@gmail.com>2018-11-23 00:21:29 +0100
committerMatija Čupić <matteeyah@gmail.com>2018-12-08 19:28:56 +0100
commitd27de096c2d889be69b8e5ac82284bee8034d158 (patch)
tree06f2532e2e4b86ba008730a2b03eb3e2d9d66fe9
parent350ea9c55ab6b980ac5ec74d2a34b9cbac915e20 (diff)
downloadgitlab-ce-d27de096c2d889be69b8e5ac82284bee8034d158.tar.gz
Revert "Use to_s.start_with? in tag/branch ref method"
This reverts commit ec4730478b798270781257913ee4cede673d4d4e.
-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 7c590846f74..44a62586a23 100644
--- a/lib/gitlab/git.rb
+++ b/lib/gitlab/git.rb
@@ -54,11 +54,11 @@ module Gitlab
end
def tag_ref?(ref)
- ref.to_s.start_with?(TAG_REF_PREFIX)
+ ref =~ /^#{TAG_REF_PREFIX}.+/
end
def branch_ref?(ref)
- ref.to_s.start_with?(BRANCH_REF_PREFIX)
+ ref =~ /^#{BRANCH_REF_PREFIX}.+/
end
def blank_ref?(ref)