diff options
author | Junio C Hamano <gitster@pobox.com> | 2021-01-25 14:19:18 -0800 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2021-01-25 14:19:18 -0800 |
commit | 27d7c8599b159862762e2bd121c22d516fb04e90 (patch) | |
tree | 91bed47151791fe2e18e8e9e07a5d58207413bda /t/t6406-merge-attr.sh | |
parent | Merge branch 'dl/reflog-with-single-entry' (diff) | |
parent | tests: drop prereq `PREPARE_FOR_MAIN_BRANCH` where no longer needed (diff) | |
download | tgif-27d7c8599b159862762e2bd121c22d516fb04e90.tar.xz |
Merge branch 'js/default-branch-name-tests-final-stretch'
Prepare tests not to be affected by the name of the default branch
"git init" creates.
* js/default-branch-name-tests-final-stretch: (28 commits)
tests: drop prereq `PREPARE_FOR_MAIN_BRANCH` where no longer needed
t99*: adjust the references to the default branch name "main"
tests(git-p4): transition to the default branch name `main`
t9[5-7]*: adjust the references to the default branch name "main"
t9[0-4]*: adjust the references to the default branch name "main"
t8*: adjust the references to the default branch name "main"
t7[5-9]*: adjust the references to the default branch name "main"
t7[0-4]*: adjust the references to the default branch name "main"
t6[4-9]*: adjust the references to the default branch name "main"
t64*: preemptively adjust alignment to prepare for `master` -> `main`
t6[0-3]*: adjust the references to the default branch name "main"
t5[6-9]*: adjust the references to the default branch name "main"
t55[4-9]*: adjust the references to the default branch name "main"
t55[23]*: adjust the references to the default branch name "main"
t551*: adjust the references to the default branch name "main"
t550*: adjust the references to the default branch name "main"
t5503: prepare aligned comment for replacing `master` with `main`
t5[0-4]*: adjust the references to the default branch name "main"
t5323: prepare centered comment for `master` -> `main`
t4*: adjust the references to the default branch name "main"
...
Diffstat (limited to 't/t6406-merge-attr.sh')
-rwxr-xr-x | t/t6406-merge-attr.sh | 27 |
1 files changed, 15 insertions, 12 deletions
diff --git a/t/t6406-merge-attr.sh b/t/t6406-merge-attr.sh index 76a55f838c..d5a4ac2d81 100755 --- a/t/t6406-merge-attr.sh +++ b/t/t6406-merge-attr.sh @@ -5,6 +5,9 @@ test_description='per path merge controlled by merge attribute' +GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main +export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME + . ./test-lib.sh test_expect_success setup ' @@ -19,10 +22,10 @@ test_expect_success setup ' git branch side && for f in text binary union do - echo Master >>$f && git add $f || return 1 + echo Main >>$f && git add $f || return 1 done && test_tick && - git commit -m Master && + git commit -m Main && git checkout side && for f in text binary union @@ -64,7 +67,7 @@ test_expect_success merge ' echo "union merge=union" } >.gitattributes && - if git merge master + if git merge main then echo Gaah, should have conflicted false @@ -87,7 +90,7 @@ test_expect_success 'check merge result in working tree' ' grep "<<<<<<<" text && cmp binary-orig binary && ! grep "<<<<<<<" union && - grep Master union && + grep Main union && grep Side union ' @@ -115,13 +118,13 @@ test_expect_success 'custom merge backend' ' git config --replace-all \ merge.custom.name "custom merge driver for testing" && - git merge master && + git merge main && cmp binary union && sed -e 1,3d text >check-1 && - o=$(git unpack-file master^:text) && + o=$(git unpack-file main^:text) && a=$(git unpack-file side^:text) && - b=$(git unpack-file master:text) && + b=$(git unpack-file main:text) && sh -c "./custom-merge $o $a $b 0 text" && sed -e 1,3d $a >check-2 && cmp check-1 check-2 && @@ -136,7 +139,7 @@ test_expect_success 'custom merge backend' ' git config --replace-all \ merge.custom.name "custom merge driver for testing" && - if git merge master + if git merge main then echo "Eh? should have conflicted" false @@ -146,9 +149,9 @@ test_expect_success 'custom merge backend' ' cmp binary union && sed -e 1,3d text >check-1 && - o=$(git unpack-file master^:text) && + o=$(git unpack-file main^:text) && a=$(git unpack-file anchor:text) && - b=$(git unpack-file master:text) && + b=$(git unpack-file main:text) && sh -c "./custom-merge $o $a $b 0 text" && sed -e 1,3d $a >check-2 && cmp check-1 check-2 && @@ -176,7 +179,7 @@ test_expect_success 'up-to-date merge without common ancestor' ' test_tick && ( cd repo1 && - git fetch ../repo2 master && + git fetch ../repo2 main && git merge --allow-unrelated-histories FETCH_HEAD ) ' @@ -201,7 +204,7 @@ test_expect_success 'custom merge does not lock index' ' # By packaging the command in test_when_finished, we get both # the correctness check and the clean-up. test_when_finished "kill \$(cat sleep.pid)" && - git merge master + git merge main ' test_done |