diff options
author | Rémy Coutable <remy@rymai.me> | 2018-01-25 12:16:18 +0300 |
---|---|---|
committer | Ian Baum <ibaum@gitlab.com> | 2018-01-29 21:02:46 +0300 |
commit | b404ea4b5e19643bc859cb1e3c282f834d46ea7e (patch) | |
tree | d407ccc73842e842248bd61f8aea0da86592c438 /lib/gitlab | |
parent | 8be09a0cce151f47d136809b55c66cf9dba9c2ac (diff) |
Merge branch '42161-gitaly-commitservice-encoding-undefinedconversionerror-u-c124-from-utf-8-to-ascii-8bit' into 'master'
Resolve "Gitaly::CommitService: Encoding::UndefinedConversionError: U+C124 from UTF-8 to ASCII-8BIT"
Closes #42161
See merge request gitlab-org/gitlab-ce!16637
Diffstat (limited to 'lib/gitlab')
-rw-r--r-- | lib/gitlab/gitaly_client/commit_service.rb | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/gitlab/gitaly_client/commit_service.rb b/lib/gitlab/gitaly_client/commit_service.rb index fed05bb6c64..ceefd4d7b50 100644 --- a/lib/gitlab/gitaly_client/commit_service.rb +++ b/lib/gitlab/gitaly_client/commit_service.rb @@ -125,11 +125,11 @@ module Gitlab def commit_count(ref, options = {}) request = Gitaly::CountCommitsRequest.new( repository: @gitaly_repo, - revision: ref + revision: encode_binary(ref) ) request.after = Google::Protobuf::Timestamp.new(seconds: options[:after].to_i) if options[:after].present? request.before = Google::Protobuf::Timestamp.new(seconds: options[:before].to_i) if options[:before].present? - request.path = options[:path] if options[:path].present? + request.path = encode_binary(options[:path]) if options[:path].present? request.max_count = options[:max_count] if options[:max_count].present? GitalyClient.call(@repository.storage, :commit_service, :count_commits, request, timeout: GitalyClient.medium_timeout).count |