summaryrefslogtreecommitdiff
path: root/t/t6415-merge-dir-to-symlink.sh
diff options
context:
space:
mode:
Diffstat (limited to 't/t6415-merge-dir-to-symlink.sh')
-rwxr-xr-xt/t6415-merge-dir-to-symlink.sh25
1 files changed, 14 insertions, 11 deletions
diff --git a/t/t6415-merge-dir-to-symlink.sh b/t/t6415-merge-dir-to-symlink.sh
index 2eddcc7664..2ce104aca7 100755
--- a/t/t6415-merge-dir-to-symlink.sh
+++ b/t/t6415-merge-dir-to-symlink.sh
@@ -1,6 +1,9 @@
#!/bin/sh
test_description='merging when a directory was replaced with a symlink'
+GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main
+export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME
+
. ./test-lib.sh
test_expect_success 'create a commit where dir a/b changed to symlink' '
@@ -19,7 +22,7 @@ test_expect_success 'create a commit where dir a/b changed to symlink' '
test_expect_success 'checkout does not clobber untracked symlink' '
git checkout HEAD^0 &&
- git reset --hard master &&
+ git reset --hard main &&
git rm --cached a/b &&
git commit -m "untracked symlink remains" &&
test_must_fail git checkout start^0
@@ -27,7 +30,7 @@ test_expect_success 'checkout does not clobber untracked symlink' '
test_expect_success 'a/b-2/c/d is kept when clobbering symlink b' '
git checkout HEAD^0 &&
- git reset --hard master &&
+ git reset --hard main &&
git rm --cached a/b &&
git commit -m "untracked symlink remains" &&
git checkout -f start^0 &&
@@ -36,7 +39,7 @@ test_expect_success 'a/b-2/c/d is kept when clobbering symlink b' '
test_expect_success 'checkout should not have deleted a/b-2/c/d' '
git checkout HEAD^0 &&
- git reset --hard master &&
+ git reset --hard main &&
git checkout start^0 &&
test_path_is_file a/b-2/c/d
'
@@ -53,7 +56,7 @@ test_expect_success 'setup for merge test' '
test_expect_success 'Handle D/F conflict, do not lose a/b-2/c/d in merge (resolve)' '
git reset --hard &&
git checkout baseline^0 &&
- git merge -s resolve master &&
+ git merge -s resolve main &&
test_path_is_file a/b-2/c/d
'
@@ -64,7 +67,7 @@ test_expect_success SYMLINKS 'a/b was resolved as symlink' '
test_expect_success 'Handle D/F conflict, do not lose a/b-2/c/d in merge (recursive)' '
git reset --hard &&
git checkout baseline^0 &&
- git merge -s recursive master &&
+ git merge -s recursive main &&
test_path_is_file a/b-2/c/d
'
@@ -74,7 +77,7 @@ test_expect_success SYMLINKS 'a/b was resolved as symlink' '
test_expect_success 'Handle F/D conflict, do not lose a/b-2/c/d in merge (resolve)' '
git reset --hard &&
- git checkout master^0 &&
+ git checkout main^0 &&
git merge -s resolve baseline^0 &&
test_path_is_file a/b-2/c/d
'
@@ -85,7 +88,7 @@ test_expect_success SYMLINKS 'a/b was resolved as symlink' '
test_expect_success 'Handle F/D conflict, do not lose a/b-2/c/d in merge (recursive)' '
git reset --hard &&
- git checkout master^0 &&
+ git checkout main^0 &&
git merge -s recursive baseline^0 &&
test_path_is_file a/b-2/c/d
'
@@ -98,7 +101,7 @@ test_expect_failure 'do not lose untracked in merge (resolve)' '
git reset --hard &&
git checkout baseline^0 &&
>a/b/c/e &&
- test_must_fail git merge -s resolve master &&
+ test_must_fail git merge -s resolve main &&
test_path_is_file a/b/c/e &&
test_path_is_file a/b-2/c/d
'
@@ -107,7 +110,7 @@ test_expect_success 'do not lose untracked in merge (recursive)' '
git reset --hard &&
git checkout baseline^0 &&
>a/b/c/e &&
- test_must_fail git merge -s recursive master &&
+ test_must_fail git merge -s recursive main &&
test_path_is_file a/b/c/e &&
test_path_is_file a/b-2/c/d
'
@@ -116,14 +119,14 @@ test_expect_success 'do not lose modifications in merge (resolve)' '
git reset --hard &&
git checkout baseline^0 &&
echo more content >>a/b/c/d &&
- test_must_fail git merge -s resolve master
+ test_must_fail git merge -s resolve main
'
test_expect_success 'do not lose modifications in merge (recursive)' '
git reset --hard &&
git checkout baseline^0 &&
echo more content >>a/b/c/d &&
- test_must_fail git merge -s recursive master
+ test_must_fail git merge -s recursive main
'
test_expect_success 'setup a merge where dir a/b-2 changed to symlink' '