summaryrefslogtreecommitdiff
path: root/t/t3420-rebase-autostash.sh
diff options
context:
space:
mode:
Diffstat (limited to 't/t3420-rebase-autostash.sh')
-rwxr-xr-xt/t3420-rebase-autostash.sh11
1 files changed, 7 insertions, 4 deletions
diff --git a/t/t3420-rebase-autostash.sh b/t/t3420-rebase-autostash.sh
index ca331733fb..4caa014c71 100755
--- a/t/t3420-rebase-autostash.sh
+++ b/t/t3420-rebase-autostash.sh
@@ -4,6 +4,9 @@
#
test_description='git rebase --autostash tests'
+GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main
+export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME
+
. ./test-lib.sh
test_expect_success setup '
@@ -21,12 +24,12 @@ test_expect_success setup '
git add . &&
test_tick &&
git commit -m "third commit" &&
- git checkout -b unrelated-onto-branch master &&
+ git checkout -b unrelated-onto-branch main &&
echo unrelated >file4 &&
git add . &&
test_tick &&
git commit -m "unrelated commit" &&
- git checkout -b related-onto-branch master &&
+ git checkout -b related-onto-branch main &&
echo conflicting-change >file2 &&
git add . &&
test_tick &&
@@ -305,7 +308,7 @@ test_expect_success 'autostash is saved on editor failure with conflict' '
'
test_expect_success 'autostash with dirty submodules' '
- test_when_finished "git reset --hard && git checkout master" &&
+ test_when_finished "git reset --hard && git checkout main" &&
git checkout -b with-submodule &&
git submodule add ./ sub &&
test_tick &&
@@ -324,7 +327,7 @@ test_expect_success 'branch is left alone when possible' '
test_expect_success 'never change active branch' '
git checkout -b not-the-feature-branch unrelated-onto-branch &&
- test_when_finished "git reset --hard && git checkout master" &&
+ test_when_finished "git reset --hard && git checkout main" &&
echo changed >file0 &&
git rebase --autostash not-the-feature-branch feature-branch &&
test_cmp_rev not-the-feature-branch unrelated-onto-branch