summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorDouwe Maan <douwe@selenight.nl>2018-03-27 18:20:03 +0200
committerDouwe Maan <douwe@selenight.nl>2018-03-27 18:20:08 +0200
commit39c911eaaa68c79381fb420859b45658e9c71f2f (patch)
treec23eeba9281d99cf4788461675f13095ddd7a82f /lib
parentf56ef2065710346f9998c87a136abc2fe3cbc454 (diff)
downloadgitlab-ce-39c911eaaa68c79381fb420859b45658e9c71f2f.tar.gz
Fix listing commit branch/tags that contain special charactersdm-refs-contains-sha-encoding
Diffstat (limited to 'lib')
-rw-r--r--lib/gitlab/git/repository.rb3
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/gitlab/git/repository.rb b/lib/gitlab/git/repository.rb
index 20b0647fce9..2d16a81c888 100644
--- a/lib/gitlab/git/repository.rb
+++ b/lib/gitlab/git/repository.rb
@@ -8,6 +8,7 @@ module Gitlab
class Repository
include Gitlab::Git::RepositoryMirroring
include Gitlab::Git::Popen
+ include Gitlab::EncodingHelper
ALLOWED_OBJECT_DIRECTORIES_VARIABLES = %w[
GIT_OBJECT_DIRECTORY
@@ -1479,7 +1480,7 @@ module Gitlab
names.lines.each do |line|
next unless line.start_with?(refs_prefix)
- refs << line.rstrip[left_slice_count..-1]
+ refs << encode_utf8(line.rstrip[left_slice_count..-1])
end
refs