summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--lib/gitlab/git/ref.rb3
1 files changed, 1 insertions, 2 deletions
diff --git a/lib/gitlab/git/ref.rb b/lib/gitlab/git/ref.rb
index 98d88f996f8..372ce005b94 100644
--- a/lib/gitlab/git/ref.rb
+++ b/lib/gitlab/git/ref.rb
@@ -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