Skip to content
This repository was archived by the owner on Nov 9, 2017. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 5 additions & 3 deletions t/t4041-diff-submodule-option.sh
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ This test tries to verify the sanity of the --submodule option of git diff.

# String "added" in German (translated with Google Translate), encoded in UTF-8,
# used in sample commit log messages in add_file() function below.
added=$(printf "hinzugef\303\274gt" | iconv -t utf-8)
added=$(printf "hinzugef\303\274gt")
add_file () {
(
cd "$1" &&
Expand All @@ -23,8 +23,10 @@ add_file () {
echo "$name" >"$name" &&
git add "$name" &&
test_tick &&
msg_added_iso88591=$(echo "Add $name ($added $name)" | iconv -f utf-8 -t iso8859-1) &&
git -c 'i18n.commitEncoding=iso8859-1' commit -m "$msg_added_iso88591"
# "git commit -m" would break MinGW, as Windows refuse to pass
# iso8859-1 encoded parameter to git.
echo "Add $name ($added $name)" | iconv -f utf-8 -t iso8859-1 |
git -c 'i18n.commitEncoding=iso8859-1' commit -F -
done >/dev/null &&
git rev-parse --short --verify HEAD
)
Expand Down
5 changes: 3 additions & 2 deletions t/t4205-log-pretty-formats.sh
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,9 @@ test_expect_success 'set up basic repos' '
git add foo &&
test_tick &&
git config i18n.commitEncoding iso8859-1 &&
commit_msg iso8859-1 > commit_msg &&
git commit --file commit_msg &&
# "git commit -m" would break MinGW, as Windows refuse to pass
# iso8859-1 encoded parameter to git.
commit_msg iso8859-1 | git commit -F - &&
git add bar &&
test_tick &&
git commit -m "add bar" &&
Expand Down
12 changes: 8 additions & 4 deletions t/t7102-reset.sh
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ commit_msg () {
msg="modify 2nd file (ge\303\244ndert)\n"
if test -n "$1"
then
printf "$msg" | iconv -t "$1"
printf "$msg" | iconv -f utf-8 -t "$1"
else
printf "$msg"
fi
Expand All @@ -41,7 +41,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=iso8859-1" commit -a -m "$(commit_msg iso8859-1)" &&
# "git commit -m" would break MinGW, as Windows refuse to pass
# iso8859-1 encoded parameter to git.
commit_msg iso8859-1 | git -c "i18n.commitEncoding=iso8859-1" commit -a -F - &&
head5=$(git rev-parse --verify HEAD)
'
# git log --pretty=oneline # to see those SHA1 involved
Expand All @@ -60,7 +62,7 @@ check_changes () {
test_expect_success 'reset --hard message' '
hex=$(git log -1 --format="%h") &&
git reset --hard > .actual &&
echo HEAD is now at $hex $(commit_msg utf-8) > .expected &&
echo HEAD is now at $hex $(commit_msg) > .expected &&
test_cmp .expected .actual
'

Expand Down Expand Up @@ -331,7 +333,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=iso8859-1" commit -a -m "$(commit_msg iso8859-1)" &&
# "git commit -m" would break MinGW, as Windows refuse to pass
# iso8859-1 encoded parameter to git.
commit_msg iso8859-1 | git -c "i18n.commitEncoding=iso8859-1" commit -a -F - &&
check_changes $head5
'

Expand Down