summaryrefslogtreecommitdiff
path: root/t/t4150-am.sh
diff options
context:
space:
mode:
Diffstat (limited to 't/t4150-am.sh')
-rwxr-xr-xt/t4150-am.sh29
1 files changed, 16 insertions, 13 deletions
diff --git a/t/t4150-am.sh b/t/t4150-am.sh
index 3ecbef6..9998751 100755
--- a/t/t4150-am.sh
+++ b/t/t4150-am.sh
@@ -2,6 +2,9 @@
test_description='git am running'
+GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main
+export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME
+
. ./test-lib.sh
test_expect_success 'setup: messages' '
@@ -179,8 +182,8 @@ test_expect_success setup '
test_tick &&
git commit -m "added another file" &&
- git format-patch --stdout master >lorem-move.patch &&
- git format-patch --no-prefix --stdout master >lorem-zero.patch &&
+ git format-patch --stdout main >lorem-move.patch &&
+ git format-patch --no-prefix --stdout main >lorem-zero.patch &&
git checkout -b rename &&
git mv file renamed &&
@@ -453,11 +456,11 @@ test_expect_success 'am changes committer and keeps author' '
git checkout first &&
git am patch2 &&
test_path_is_missing .git/rebase-apply &&
- test "$(git rev-parse master^^)" = "$(git rev-parse HEAD^^)" &&
- git diff --exit-code master..HEAD &&
- git diff --exit-code master^..HEAD^ &&
- compare author master HEAD &&
- compare author master^ HEAD^ &&
+ test "$(git rev-parse main^^)" = "$(git rev-parse HEAD^^)" &&
+ git diff --exit-code main..HEAD &&
+ git diff --exit-code main^..HEAD^ &&
+ compare author main HEAD &&
+ compare author main^ HEAD^ &&
test "$GIT_COMMITTER_NAME <$GIT_COMMITTER_EMAIL>" = \
"$(git log -1 --pretty=format:"%cn <%ce>" HEAD)"
'
@@ -759,7 +762,7 @@ test_expect_success 'am takes patches from a Pine mailbox' '
git checkout first &&
cat pine patch1 | git am &&
test_path_is_missing .git/rebase-apply &&
- git diff --exit-code master^..HEAD
+ git diff --exit-code main^..HEAD
'
test_expect_success 'am fails on mail without patch' '
@@ -1112,21 +1115,21 @@ test_expect_success 'am and .gitattibutes' '
test_commit sixth &&
git checkout test &&
- git format-patch --stdout master..HEAD >patches &&
- git reset --hard master &&
+ git format-patch --stdout main..HEAD >patches &&
+ git reset --hard main &&
git am patches &&
grep "smudged" a.txt &&
git checkout removal &&
git reset --hard &&
- git format-patch --stdout master..HEAD >patches &&
- git reset --hard master &&
+ git format-patch --stdout main..HEAD >patches &&
+ git reset --hard main &&
git am patches &&
grep "clean" a.txt &&
git checkout conflict &&
git reset --hard &&
- git format-patch --stdout master..HEAD >patches &&
+ git format-patch --stdout main..HEAD >patches &&
git reset --hard fourth &&
test_must_fail git am -3 patches &&
grep "<<<<<<<<<<" a.txt