tests: do not pass iso8859-1 encoded parameter
git commit -m with some iso8859-1 encoded stuff is doomed to fail in MinGW, because Windows don't let you pass encoded bytes to a process (CreateProcessW always takes a UTF-16LE encoded string). It is safe to pass the iso8859-1 message using a file or a pipe. Thanks-to: Karsten Blees <blees@dcon.de> Author: Stepan Kasal <kasal@ucw.cz> Signed-off-by: Stepan Kasal <kasal@ucw.cz> Signed-off-by: Junio C Hamano <gitster@pobox.com>
This commit is contained in:
committed by
Junio C Hamano
parent
0217569bb2
commit
e6ce2be2d7
@ -26,8 +26,10 @@ add_file () {
|
||||
echo "$name" >"$name" &&
|
||||
git add "$name" &&
|
||||
test_tick &&
|
||||
msg_added_iso88591=$(echo "Add $name ($added $name)" | iconv -f utf-8 -t $test_encoding) &&
|
||||
git -c "i18n.commitEncoding=$test_encoding" commit -m "$msg_added_iso88591"
|
||||
# "git commit -m" would break MinGW, as Windows refuse to pass
|
||||
# $test_encoding encoded parameter to git.
|
||||
echo "Add $name ($added $name)" | iconv -f utf-8 -t $test_encoding |
|
||||
git -c "i18n.commitEncoding=$test_encoding" commit -F -
|
||||
done >/dev/null &&
|
||||
git rev-parse --short --verify HEAD
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user