summaryrefslogtreecommitdiff
path: root/t/t3901-i18n-patch.sh
diff options
context:
space:
mode:
Diffstat (limited to 't/t3901-i18n-patch.sh')
-rwxr-xr-xt/t3901-i18n-patch.sh43
1 files changed, 23 insertions, 20 deletions
diff --git a/t/t3901-i18n-patch.sh b/t/t3901-i18n-patch.sh
index 923eb01f0e..4f16a735d9 100755
--- a/t/t3901-i18n-patch.sh
+++ b/t/t3901-i18n-patch.sh
@@ -5,6 +5,9 @@
test_description='i18n settings and format-patch | am pipe'
+GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main
+export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME
+
. ./test-lib.sh
check_encoding () {
@@ -45,7 +48,7 @@ test_expect_success setup '
# the first commit on the side branch is UTF-8
test_tick &&
- git checkout -b side master^ &&
+ git checkout -b side main^ &&
echo Another file >yours &&
git add yours &&
git commit -s -m "Second on side" &&
@@ -69,7 +72,7 @@ test_expect_success setup '
test_expect_success 'format-patch output (ISO-8859-1)' '
git config i18n.logoutputencoding ISO8859-1 &&
- git format-patch --stdout master..HEAD^ >out-l1 &&
+ git format-patch --stdout main..HEAD^ >out-l1 &&
git format-patch --stdout HEAD^ >out-l2 &&
grep "^Content-Type: text/plain; charset=ISO8859-1" out-l1 &&
grep "^From: =?ISO8859-1?q?=C1=E9=ED=20=F3=FA?=" out-l1 &&
@@ -80,7 +83,7 @@ test_expect_success 'format-patch output (ISO-8859-1)' '
test_expect_success 'format-patch output (UTF-8)' '
git config i18n.logoutputencoding UTF-8 &&
- git format-patch --stdout master..HEAD^ >out-u1 &&
+ git format-patch --stdout main..HEAD^ >out-u1 &&
git format-patch --stdout HEAD^ >out-u2 &&
grep "^Content-Type: text/plain; charset=UTF-8" out-u1 &&
grep "^From: =?UTF-8?q?=C3=81=C3=A9=C3=AD=20=C3=B3=C3=BA?=" out-u1 &&
@@ -102,7 +105,7 @@ test_expect_success 'rebase (U/U)' '
# we want UTF-8 encoded name.
. "$TEST_DIRECTORY"/t3901/utf8.txt &&
git checkout -b test &&
- git rebase master &&
+ git rebase main &&
check_encoding 2
'
@@ -113,7 +116,7 @@ test_expect_success 'rebase (U/L)' '
. "$TEST_DIRECTORY"/t3901/utf8.txt &&
git reset --hard side &&
- git rebase master &&
+ git rebase main &&
check_encoding 2
'
@@ -125,7 +128,7 @@ test_expect_success !MINGW 'rebase (L/L)' '
. "$TEST_DIRECTORY"/t3901/8859-1.txt &&
git reset --hard side &&
- git rebase master &&
+ git rebase main &&
check_encoding 2 8859
'
@@ -138,7 +141,7 @@ test_expect_success !MINGW 'rebase (L/U)' '
. "$TEST_DIRECTORY"/t3901/8859-1.txt &&
git reset --hard side &&
- git rebase master &&
+ git rebase main &&
check_encoding 2 8859
'
@@ -150,7 +153,7 @@ test_expect_success 'cherry-pick(U/U)' '
git config i18n.logoutputencoding UTF-8 &&
. "$TEST_DIRECTORY"/t3901/utf8.txt &&
- git reset --hard master &&
+ git reset --hard main &&
git cherry-pick side^ &&
git cherry-pick side &&
git revert HEAD &&
@@ -165,7 +168,7 @@ test_expect_success !MINGW 'cherry-pick(L/L)' '
git config i18n.logoutputencoding ISO8859-1 &&
. "$TEST_DIRECTORY"/t3901/8859-1.txt &&
- git reset --hard master &&
+ git reset --hard main &&
git cherry-pick side^ &&
git cherry-pick side &&
git revert HEAD &&
@@ -180,7 +183,7 @@ test_expect_success 'cherry-pick(U/L)' '
git config i18n.logoutputencoding ISO8859-1 &&
. "$TEST_DIRECTORY"/t3901/utf8.txt &&
- git reset --hard master &&
+ git reset --hard main &&
git cherry-pick side^ &&
git cherry-pick side &&
git revert HEAD &&
@@ -196,7 +199,7 @@ test_expect_success !MINGW 'cherry-pick(L/U)' '
git config i18n.logoutputencoding UTF-8 &&
. "$TEST_DIRECTORY"/t3901/8859-1.txt &&
- git reset --hard master &&
+ git reset --hard main &&
git cherry-pick side^ &&
git cherry-pick side &&
git revert HEAD &&
@@ -210,7 +213,7 @@ test_expect_success 'rebase --merge (U/U)' '
. "$TEST_DIRECTORY"/t3901/utf8.txt &&
git reset --hard side &&
- git rebase --merge master &&
+ git rebase --merge main &&
check_encoding 2
'
@@ -221,7 +224,7 @@ test_expect_success 'rebase --merge (U/L)' '
. "$TEST_DIRECTORY"/t3901/utf8.txt &&
git reset --hard side &&
- git rebase --merge master &&
+ git rebase --merge main &&
check_encoding 2
'
@@ -233,7 +236,7 @@ test_expect_success 'rebase --merge (L/L)' '
. "$TEST_DIRECTORY"/t3901/8859-1.txt &&
git reset --hard side &&
- git rebase --merge master &&
+ git rebase --merge main &&
check_encoding 2 8859
'
@@ -246,7 +249,7 @@ test_expect_success 'rebase --merge (L/U)' '
. "$TEST_DIRECTORY"/t3901/8859-1.txt &&
git reset --hard side &&
- git rebase --merge master &&
+ git rebase --merge main &&
check_encoding 2 8859
'
@@ -256,7 +259,7 @@ test_expect_success 'am (U/U)' '
git config i18n.commitencoding UTF-8 &&
. "$TEST_DIRECTORY"/t3901/utf8.txt &&
- git reset --hard master &&
+ git reset --hard main &&
git am out-u1 out-u2 &&
check_encoding 2
@@ -267,7 +270,7 @@ test_expect_success !MINGW 'am (L/L)' '
git config i18n.commitencoding ISO8859-1 &&
. "$TEST_DIRECTORY"/t3901/8859-1.txt &&
- git reset --hard master &&
+ git reset --hard main &&
git am out-l1 out-l2 &&
check_encoding 2 8859
@@ -277,7 +280,7 @@ test_expect_success 'am (U/L)' '
# Apply ISO-8859-1 patches with UTF-8 commitencoding
git config i18n.commitencoding UTF-8 &&
. "$TEST_DIRECTORY"/t3901/utf8.txt &&
- git reset --hard master &&
+ git reset --hard main &&
# am specifies --utf8 by default.
git am out-l1 out-l2 &&
@@ -290,7 +293,7 @@ test_expect_success 'am --no-utf8 (U/L)' '
git config i18n.commitencoding UTF-8 &&
. "$TEST_DIRECTORY"/t3901/utf8.txt &&
- git reset --hard master &&
+ git reset --hard main &&
git am --no-utf8 out-l1 out-l2 2>err &&
# commit-tree will warn that the commit message does not contain valid UTF-8
@@ -305,7 +308,7 @@ test_expect_success !MINGW 'am (L/U)' '
git config i18n.commitencoding ISO8859-1 &&
. "$TEST_DIRECTORY"/t3901/8859-1.txt &&
- git reset --hard master &&
+ git reset --hard main &&
# mailinfo will re-code the commit message to the charset specified by
# i18n.commitencoding
git am out-u1 out-u2 &&