Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.kernel.org/pub/scm/git/git.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJohannes Schindelin <johannes.schindelin@gmx.de>2020-11-19 02:44:40 +0300
committerJunio C Hamano <gitster@pobox.com>2020-11-20 02:44:18 +0300
commit1e2ae142c06f7648a646278947bbcb61173f37eb (patch)
treee1050696a0fb5f407ac538f1c944e78d420da791 /t/t7608-merge-messages.sh
parent01dc81336dc10c8f2350454c755a8a0ab676a9c9 (diff)
t7[5-9]*: adjust the references to the default branch name "main"
Excluding t7817, which is added in an unrelated patch series at the time of writing, this adjusts t7[5-9]*. This trick was performed via $ (cd t && sed -i -e 's/master/main/g' -e 's/MASTER/MAIN/g' \ -e 's/Master/Main/g' -- t7[5-9]*.sh) This allows us to define `GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main` for those tests. Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 't/t7608-merge-messages.sh')
-rwxr-xr-xt/t7608-merge-messages.sh38
1 files changed, 19 insertions, 19 deletions
diff --git a/t/t7608-merge-messages.sh b/t/t7608-merge-messages.sh
index 7059c2a54b..0b908ab2e7 100755
--- a/t/t7608-merge-messages.sh
+++ b/t/t7608-merge-messages.sh
@@ -1,7 +1,7 @@
#!/bin/sh
test_description='test auto-generated merge messages'
-GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=master
+GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main
export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME
. ./test-lib.sh
@@ -13,51 +13,51 @@ check_oneline() {
}
test_expect_success 'merge local branch' '
- test_commit master-1 &&
+ test_commit main-1 &&
git checkout -b local-branch &&
test_commit branch-1 &&
- git checkout master &&
- test_commit master-2 &&
+ git checkout main &&
+ test_commit main-2 &&
git merge local-branch &&
check_oneline "Merge branch Qlocal-branchQ"
'
test_expect_success 'merge octopus branches' '
- git checkout -b octopus-a master &&
+ git checkout -b octopus-a main &&
test_commit octopus-1 &&
- git checkout -b octopus-b master &&
+ git checkout -b octopus-b main &&
test_commit octopus-2 &&
- git checkout master &&
+ git checkout main &&
git merge octopus-a octopus-b &&
check_oneline "Merge branches Qoctopus-aQ and Qoctopus-bQ"
'
test_expect_success 'merge tag' '
- git checkout -b tag-branch master &&
+ git checkout -b tag-branch main &&
test_commit tag-1 &&
- git checkout master &&
- test_commit master-3 &&
+ git checkout main &&
+ test_commit main-3 &&
git merge tag-1 &&
check_oneline "Merge tag Qtag-1Q"
'
test_expect_success 'ambiguous tag' '
- git checkout -b ambiguous master &&
+ git checkout -b ambiguous main &&
test_commit ambiguous &&
- git checkout master &&
- test_commit master-4 &&
+ git checkout main &&
+ test_commit main-4 &&
git merge ambiguous &&
check_oneline "Merge tag QambiguousQ"
'
test_expect_success 'remote-tracking branch' '
- git checkout -b remote master &&
+ git checkout -b remote main &&
test_commit remote-1 &&
- git update-ref refs/remotes/origin/master remote &&
- git checkout master &&
- test_commit master-5 &&
- git merge origin/master &&
- check_oneline "Merge remote-tracking branch Qorigin/masterQ"
+ git update-ref refs/remotes/origin/main remote &&
+ git checkout main &&
+ test_commit main-5 &&
+ git merge origin/main &&
+ check_oneline "Merge remote-tracking branch Qorigin/mainQ"
'
test_done