Commit 28d95e10 authored by Ahmad Sherif's avatar Ahmad Sherif

Encode paths properly for Gitaly Commit{Diff,Delta}

Fixes gitaly#589
parent 706426d5
......@@ -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%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment