Commit 48a2c680 authored by Jacob Vosmaer's avatar Jacob Vosmaer

Use helper instead of ad-hoc regex

parent b304fd79
......@@ -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
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment