aboutsummaryrefslogtreecommitdiff
path: root/t/t7102-reset.sh
diff options
context:
space:
mode:
authorPat Thoyts <patthoyts@users.sourceforge.net>2013-09-02 15:44:54 +0100
committerJunio C Hamano <gitster@pobox.com>2014-07-15 11:19:11 -0700
commite6ce2be2d7a70dfa3241f70ae236da4a63625ef8 (patch)
tree7627dd04fdb74a0ea4f942abc11a176ace4cadda /t/t7102-reset.sh
parent0217569bb2db23b8686f67b0f4dda7e517dec6fd (diff)
downloadgit-e6ce2be2d7a70dfa3241f70ae236da4a63625ef8.tar.gz
git-e6ce2be2d7a70dfa3241f70ae236da4a63625ef8.tar.xz
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>
Diffstat (limited to 't/t7102-reset.sh')
-rwxr-xr-xt/t7102-reset.sh8
1 files changed, 6 insertions, 2 deletions
diff --git a/t/t7102-reset.sh b/t/t7102-reset.sh
index ee703bed6..98bcfe21a 100755
--- a/t/t7102-reset.sh
+++ b/t/t7102-reset.sh
@@ -44,7 +44,9 @@ test_expect_success 'creating initial files and commits' '
echo "1st line 2nd file" >secondfile &&
echo "2nd line 2nd file" >>secondfile &&
- git -c "i18n.commitEncoding=$test_encoding" commit -a -m "$(commit_msg $test_encoding)" &&
+ # "git commit -m" would break MinGW, as Windows refuse to pass
+ # $test_encoding encoded parameter to git.
+ commit_msg $test_encoding | git -c "i18n.commitEncoding=$test_encoding" commit -a -F - &&
head5=$(git rev-parse --verify HEAD)
'
# git log --pretty=oneline # to see those SHA1 involved
@@ -334,7 +336,9 @@ test_expect_success 'redoing the last two commits should succeed' '
echo "1st line 2nd file" >secondfile &&
echo "2nd line 2nd file" >>secondfile &&
- git -c "i18n.commitEncoding=$test_encoding" commit -a -m "$(commit_msg $test_encoding)" &&
+ # "git commit -m" would break MinGW, as Windows refuse to pass
+ # $test_encoding encoded parameter to git.
+ commit_msg $test_encoding | git -c "i18n.commitEncoding=$test_encoding" commit -a -F - &&
check_changes $head5
'