File tree Expand file tree Collapse file tree 4 files changed +13
-7
lines changed
Expand file tree Collapse file tree 4 files changed +13
-7
lines changed Original file line number Diff line number Diff line change @@ -26,8 +26,10 @@ add_file () {
2626 echo " $name " > " $name " &&
2727 git add " $name " &&
2828 test_tick &&
29- msg_added_iso88591=$( echo " Add $name ($added $name )" | iconv -f utf-8 -t $test_encoding ) &&
30- git -c " i18n.commitEncoding=$test_encoding " commit -m " $msg_added_iso88591 "
29+ # "git commit -m" would break MinGW, as Windows refuse to pass
30+ # $test_encoding encoded parameter to git.
31+ echo " Add $name ($added $name )" | iconv -f utf-8 -t $test_encoding |
32+ git -c " i18n.commitEncoding=$test_encoding " commit -F -
3133 done > /dev/null &&
3234 git rev-parse --short --verify HEAD
3335 )
Original file line number Diff line number Diff line change @@ -31,7 +31,7 @@ test_expect_success 'set up basic repos' '
3131 git add foo &&
3232 test_tick &&
3333 git config i18n.commitEncoding $test_encoding &&
34- git commit -m "$(commit_msg $test_encoding)" &&
34+ commit_msg $test_encoding | git commit -F - &&
3535 git add bar &&
3636 test_tick &&
3737 git commit -m "add bar" &&
Original file line number Diff line number Diff line change @@ -35,13 +35,13 @@ test_expect_success 'setup' '
3535 : >foo &&
3636 git add foo &&
3737 git config i18n.commitEncoding $test_encoding &&
38- git commit -m "$added_iso88591" &&
38+ echo "$added_iso88591" | git commit -F - &&
3939 head1=$(git rev-parse --verify HEAD) &&
4040 head1_short=$(git rev-parse --verify --short $head1) &&
4141 tree1=$(git rev-parse --verify HEAD:) &&
4242 tree1_short=$(git rev-parse --verify --short $tree1) &&
4343 echo "$changed" > foo &&
44- git commit -a -m "$changed_iso88591" &&
44+ echo "$changed_iso88591" | git commit -a -F - &&
4545 head2=$(git rev-parse --verify HEAD) &&
4646 head2_short=$(git rev-parse --verify --short $head2) &&
4747 tree2=$(git rev-parse --verify HEAD:) &&
Original file line number Diff line number Diff line change @@ -44,7 +44,9 @@ test_expect_success 'creating initial files and commits' '
4444
4545 echo "1st line 2nd file" >secondfile &&
4646 echo "2nd line 2nd file" >>secondfile &&
47- git -c "i18n.commitEncoding=$test_encoding" commit -a -m "$(commit_msg $test_encoding)" &&
47+ # "git commit -m" would break MinGW, as Windows refuse to pass
48+ # $test_encoding encoded parameter to git.
49+ commit_msg $test_encoding | git -c "i18n.commitEncoding=$test_encoding" commit -a -F - &&
4850 head5=$(git rev-parse --verify HEAD)
4951'
5052# git log --pretty=oneline # to see those SHA1 involved
@@ -334,7 +336,9 @@ test_expect_success 'redoing the last two commits should succeed' '
334336
335337 echo "1st line 2nd file" >secondfile &&
336338 echo "2nd line 2nd file" >>secondfile &&
337- git -c "i18n.commitEncoding=$test_encoding" commit -a -m "$(commit_msg $test_encoding)" &&
339+ # "git commit -m" would break MinGW, as Windows refuse to pass
340+ # $test_encoding encoded parameter to git.
341+ commit_msg $test_encoding | git -c "i18n.commitEncoding=$test_encoding" commit -a -F - &&
338342 check_changes $head5
339343'
340344
You can’t perform that action at this time.
0 commit comments