Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.kernel.org/pub/scm/git/git.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlexey Shumkin <alex.crezoff@gmail.com>2014-05-21 17:20:04 +0400
committerJunio C Hamano <gitster@pobox.com>2014-05-21 22:10:06 +0400
commitee3efaf66c7599340a5deb030ee6969b6d7d39aa (patch)
tree211a29485f15223898de4d4860967777f90a5401 /t/t4041-diff-submodule-option.sh
parent496a69802bc4035d5dc26c8d97144d8ae30e52c4 (diff)
t4041, t4205, t6006, t7102: don't hardcode tested encoding value
The tested encoding is always available in a variable. Use it instead of hardcoding. Also, to be in line with other tests use ISO8859-1 (uppercase) rather then iso8859-1. Signed-off-by: Alexey Shumkin <Alex.Crezoff@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 't/t4041-diff-submodule-option.sh')
-rwxr-xr-xt/t4041-diff-submodule-option.sh7
1 files changed, 5 insertions, 2 deletions
diff --git a/t/t4041-diff-submodule-option.sh b/t/t4041-diff-submodule-option.sh
index 1751c83307..463d63bde0 100755
--- a/t/t4041-diff-submodule-option.sh
+++ b/t/t4041-diff-submodule-option.sh
@@ -11,6 +11,9 @@ This test tries to verify the sanity of the --submodule option of git diff.
. ./test-lib.sh
+# Tested non-UTF-8 encoding
+test_encoding="ISO8859-1"
+
# 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")
@@ -23,8 +26,8 @@ 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"
+ 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"
done >/dev/null &&
git rev-parse --short --verify HEAD
)