Skip to content
Snippets Groups Projects
Commit 48a2c680 authored by Jacob Vosmaer (GitLab)'s avatar Jacob Vosmaer (GitLab)
Browse files

Use helper instead of ad-hoc regex

parent b304fd79
Branches
Tags
No related merge requests found
Loading
Loading
@@ -34,8 +34,7 @@ module Gitlab
end
 
def initialize(repository, name, target, derefenced_target)
encode! name
@name = name.gsub(/\Arefs\/(tags|heads)\//, '')
@name = Gitlab::Git.ref_name(name)
@dereferenced_target = derefenced_target
@target = if target.respond_to?(:oid)
target.oid
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment