summaryrefslogtreecommitdiff
path: root/t/t1407-worktree-ref-store.sh
diff options
context:
space:
mode:
Diffstat (limited to 't/t1407-worktree-ref-store.sh')
-rwxr-xr-xt/t1407-worktree-ref-store.sh35
1 files changed, 19 insertions, 16 deletions
diff --git a/t/t1407-worktree-ref-store.sh b/t/t1407-worktree-ref-store.sh
index 9a84858118..d3fe777511 100755
--- a/t/t1407-worktree-ref-store.sh
+++ b/t/t1407-worktree-ref-store.sh
@@ -2,6 +2,9 @@
test_description='test worktree ref store api'
+GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main
+export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME
+
. ./test-lib.sh
RWT="test-tool ref-store worktree:wt"
@@ -9,7 +12,7 @@ RMAIN="test-tool ref-store worktree:main"
test_expect_success 'setup' '
test_commit first &&
- git worktree add -b wt-master wt &&
+ git worktree add -b wt-main wt &&
(
cd wt &&
test_commit second
@@ -17,34 +20,34 @@ test_expect_success 'setup' '
'
test_expect_success 'resolve_ref(<shared-ref>)' '
- SHA1=`git rev-parse master` &&
- echo "$SHA1 refs/heads/master 0x0" >expected &&
- $RWT resolve-ref refs/heads/master 0 >actual &&
+ SHA1=`git rev-parse main` &&
+ echo "$SHA1 refs/heads/main 0x0" >expected &&
+ $RWT resolve-ref refs/heads/main 0 >actual &&
test_cmp expected actual &&
- $RMAIN resolve-ref refs/heads/master 0 >actual &&
+ $RMAIN resolve-ref refs/heads/main 0 >actual &&
test_cmp expected actual
'
test_expect_success 'resolve_ref(<per-worktree-ref>)' '
SHA1=`git -C wt rev-parse HEAD` &&
- echo "$SHA1 refs/heads/wt-master 0x1" >expected &&
+ echo "$SHA1 refs/heads/wt-main 0x1" >expected &&
$RWT resolve-ref HEAD 0 >actual &&
test_cmp expected actual &&
SHA1=`git rev-parse HEAD` &&
- echo "$SHA1 refs/heads/master 0x1" >expected &&
+ echo "$SHA1 refs/heads/main 0x1" >expected &&
$RMAIN resolve-ref HEAD 0 >actual &&
test_cmp expected actual
'
-test_expect_success 'create_symref(FOO, refs/heads/master)' '
- $RWT create-symref FOO refs/heads/master nothing &&
- echo refs/heads/master >expected &&
+test_expect_success 'create_symref(FOO, refs/heads/main)' '
+ $RWT create-symref FOO refs/heads/main nothing &&
+ echo refs/heads/main >expected &&
git -C wt symbolic-ref FOO >actual &&
test_cmp expected actual &&
- $RMAIN create-symref FOO refs/heads/wt-master nothing &&
- echo refs/heads/wt-master >expected &&
+ $RMAIN create-symref FOO refs/heads/wt-main nothing &&
+ echo refs/heads/wt-main >expected &&
git symbolic-ref FOO >actual &&
test_cmp expected actual
'
@@ -63,8 +66,8 @@ test_expect_success 'for_each_reflog()' '
HEAD 0x1
PSEUDO-WT 0x0
refs/bisect/wt-random 0x0
- refs/heads/master 0x0
- refs/heads/wt-master 0x0
+ refs/heads/main 0x0
+ refs/heads/wt-main 0x0
EOF
test_cmp expected actual &&
@@ -73,8 +76,8 @@ test_expect_success 'for_each_reflog()' '
HEAD 0x1
PSEUDO-MAIN 0x0
refs/bisect/random 0x0
- refs/heads/master 0x0
- refs/heads/wt-master 0x0
+ refs/heads/main 0x0
+ refs/heads/wt-main 0x0
EOF
test_cmp expected actual
'