Skip to content
This repository was archived by the owner on Nov 9, 2017. It is now read-only.

Commit f9f2084

Browse files
committed
fixup! Merge pull request #156 from kasal/test-fix-rev
This reverts commit e42bb07, reversing changes made to 648a344. These changes will be obsoleted by the 'win-tests-rebase' branch. Signed-off-by: Johannes Schindelin <[email protected]>
1 parent 4b41a9f commit f9f2084

File tree

3 files changed

+9
-16
lines changed

3 files changed

+9
-16
lines changed

t/t4041-diff-submodule-option.sh

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ This test tries to verify the sanity of the --submodule option of git diff.
1313

1414
# String "added" in German (translated with Google Translate), encoded in UTF-8,
1515
# used in sample commit log messages in add_file() function below.
16-
added=$(printf "hinzugef\303\274gt")
16+
added=$(printf "hinzugef\303\274gt" | iconv -t utf-8)
1717
add_file () {
1818
(
1919
cd "$1" &&
@@ -23,10 +23,8 @@ add_file () {
2323
echo "$name" >"$name" &&
2424
git add "$name" &&
2525
test_tick &&
26-
# "git commit -m" would break MinGW, as Windows refuse to pass
27-
# iso8859-1 encoded parameter to git.
28-
echo "Add $name ($added $name)" | iconv -f utf-8 -t iso8859-1 |
29-
git -c 'i18n.commitEncoding=iso8859-1' commit -F -
26+
msg_added_iso88591=$(echo "Add $name ($added $name)" | iconv -f utf-8 -t iso8859-1) &&
27+
git -c 'i18n.commitEncoding=iso8859-1' commit -m "$msg_added_iso88591"
3028
done >/dev/null &&
3129
git rev-parse --short --verify HEAD
3230
)

t/t4205-log-pretty-formats.sh

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -28,9 +28,8 @@ test_expect_success 'set up basic repos' '
2828
git add foo &&
2929
test_tick &&
3030
git config i18n.commitEncoding iso8859-1 &&
31-
# "git commit -m" would break MinGW, as Windows refuse to pass
32-
# iso8859-1 encoded parameter to git.
33-
commit_msg iso8859-1 | git commit -F - &&
31+
commit_msg iso8859-1 > commit_msg &&
32+
git commit --file commit_msg &&
3433
git add bar &&
3534
test_tick &&
3635
git commit -m "add bar" &&

t/t7102-reset.sh

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ commit_msg () {
1616
msg="modify 2nd file (ge\303\244ndert)\n"
1717
if test -n "$1"
1818
then
19-
printf "$msg" | iconv -f utf-8 -t "$1"
19+
printf "$msg" | iconv -t "$1"
2020
else
2121
printf "$msg"
2222
fi
@@ -41,9 +41,7 @@ test_expect_success 'creating initial files and commits' '
4141
4242
echo "1st line 2nd file" >secondfile &&
4343
echo "2nd line 2nd file" >>secondfile &&
44-
# "git commit -m" would break MinGW, as Windows refuse to pass
45-
# iso8859-1 encoded parameter to git.
46-
commit_msg iso8859-1 | git -c "i18n.commitEncoding=iso8859-1" commit -a -F - &&
44+
git -c "i18n.commitEncoding=iso8859-1" commit -a -m "$(commit_msg iso8859-1)" &&
4745
head5=$(git rev-parse --verify HEAD)
4846
'
4947
# git log --pretty=oneline # to see those SHA1 involved
@@ -62,7 +60,7 @@ check_changes () {
6260
test_expect_success 'reset --hard message' '
6361
hex=$(git log -1 --format="%h") &&
6462
git reset --hard > .actual &&
65-
echo HEAD is now at $hex $(commit_msg) > .expected &&
63+
echo HEAD is now at $hex $(commit_msg utf-8) > .expected &&
6664
test_cmp .expected .actual
6765
'
6866

@@ -333,9 +331,7 @@ test_expect_success 'redoing the last two commits should succeed' '
333331
334332
echo "1st line 2nd file" >secondfile &&
335333
echo "2nd line 2nd file" >>secondfile &&
336-
# "git commit -m" would break MinGW, as Windows refuse to pass
337-
# iso8859-1 encoded parameter to git.
338-
commit_msg iso8859-1 | git -c "i18n.commitEncoding=iso8859-1" commit -a -F - &&
334+
git -c "i18n.commitEncoding=iso8859-1" commit -a -m "$(commit_msg iso8859-1)" &&
339335
check_changes $head5
340336
'
341337

0 commit comments

Comments
 (0)