diff options
author | Lin Jen-Shin <godfat@godfat.org> | 2018-01-23 16:26:28 +0800 |
---|---|---|
committer | Lin Jen-Shin <godfat@godfat.org> | 2018-01-23 16:27:34 +0800 |
commit | b33e7281ffef39058bcef4e741060a703cfaf02e (patch) | |
tree | de0a8406dee97bd51fcaa0feb9ab29bf6c9d828b /lib | |
parent | b472411efb238ae223f99ecda067fa22d25bf8bb (diff) | |
download | gitlab-ce-b33e7281ffef39058bcef4e741060a703cfaf02e.tar.gz |
Make sure we're passing ASCII-8BIT to Gitaly42161-gitaly-commitservice-encoding-undefinedconversionerror-u-c124-from-utf-8-to-ascii-8bit
when counting commit count.
Diffstat (limited to 'lib')
-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 2231371cfa7..33a8d3e5612 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 |