Skip to content

Fix squash rebase not working when diff contained encoded data

Stan Hu requested to merge sh-fix-squash-rebase-utf8-data into master

When the applied diff contains UTF-8 or some other encoded data, the diff returned back from the git process may be in ASCII-8BIT format. Writing this data to stdin may fail if the data because stdin expects this data to be in UTF-8. By switching the output to binmode, we ensure that the diff will always be written as-is.

Closes gitlab-org/gitlab-ee#4960

Merge request reports