Fix encoding of patterns in Gitaly list_refs calls

What does this MR do and why?

Problem

Reference patterns passed to Gitaly's ListRefsRequest were not properly encoded, causing issues when checking for the existence of branches and tags containing non-ASCII characters.

Exception example:

Encoding::UndefinedConversionError:
 U+00C4 from UTF-8 to ASCII-8BIT

Solution

Encode all patterns as binary using #encode_binary() before sending them to Gitaly.

MR acceptance checklist

Evaluate this MR against the MR acceptance checklist. It helps you analyze changes to reduce risks in quality, performance, reliability, security, and maintainability.

Edited by Vasilii Iakliushin

Merge request reports

Loading