提交 8aac719f 编写于 作者: R Robert Speicher

Merge branch 'fix/gitaly-commit-diff-rpc-encoding-error' into 'master'

Encode paths properly for Gitaly Commit{Diff,Delta}

Closes gitaly#589

See merge request gitlab-org/gitlab-ce!14361
......@@ -221,7 +221,7 @@ module Gitlab
repository: @gitaly_repo,
left_commit_id: parent_id,
right_commit_id: commit.id,
paths: options.fetch(:paths, [])
paths: options.fetch(:paths, []).map { |path| GitalyClient.encode(path) }
}
end
......
......@@ -51,6 +51,10 @@ describe Gitlab::GitalyClient::CommitService do
expect(ret).to be_kind_of(Gitlab::GitalyClient::DiffStitcher)
end
it 'encodes paths correctly' do
expect { client.diff_from_parent(commit, paths: ['encoding/test.txt', 'encoding/テスト.txt']) }.not_to raise_error
end
end
describe '#commit_deltas' do
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册