mirror of
https://github.com/git/git.git
synced 2026-01-10 10:13:33 +00:00
t[01]*: adjust the references to the default branch name "main"
Carefully excluding t1309, which sees independent development elsewhere at the time of writing, we transition above-mentioned tests to the default branch name `main`. This trick was performed via $ (cd t && sed -i -e 's/master/main/g' -e 's/MASTER/MAIN/g' \ -e 's/Master/Main/g' -e 's/naster/nain/g' -- t[01]*.sh && git checkout HEAD -- t1309\*) Note that t5533 contains a variation of the name `master` (`naster`) that we rename here, too. This allows us to define `GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main` for those tests. Helped-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com> Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de> Signed-off-by: Junio C Hamano <gitster@pobox.com>
This commit is contained in:
committed by
Junio C Hamano
parent
c2fdc8820c
commit
06d531486e
@@ -1,7 +1,7 @@
|
||||
#!/bin/sh
|
||||
|
||||
test_description='test various @{X} syntax combinations together'
|
||||
GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=master
|
||||
GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main
|
||||
export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME
|
||||
|
||||
. ./test-lib.sh
|
||||
@@ -33,8 +33,8 @@ fail() {
|
||||
}
|
||||
|
||||
test_expect_success 'setup' '
|
||||
test_commit master-one &&
|
||||
test_commit master-two &&
|
||||
test_commit main-one &&
|
||||
test_commit main-two &&
|
||||
git checkout -b upstream-branch &&
|
||||
test_commit upstream-one &&
|
||||
test_commit upstream-two &&
|
||||
@@ -50,7 +50,7 @@ test_expect_success 'setup' '
|
||||
git checkout -b new-branch &&
|
||||
test_commit new-one &&
|
||||
test_commit new-two &&
|
||||
git branch -u master old-branch &&
|
||||
git branch -u main old-branch &&
|
||||
git branch -u upstream-branch new-branch
|
||||
'
|
||||
|
||||
@@ -65,8 +65,8 @@ check "@{-1}@{1}" commit old-one
|
||||
check "@{u}" ref refs/heads/upstream-branch
|
||||
check "HEAD@{u}" ref refs/heads/upstream-branch
|
||||
check "@{u}@{1}" commit upstream-one
|
||||
check "@{-1}@{u}" ref refs/heads/master
|
||||
check "@{-1}@{u}@{1}" commit master-one
|
||||
check "@{-1}@{u}" ref refs/heads/main
|
||||
check "@{-1}@{u}@{1}" commit main-one
|
||||
check "@" commit new-two
|
||||
check "@@{u}" ref refs/heads/upstream-branch
|
||||
check "@@/at-test" ref refs/heads/@@/at-test
|
||||
|
||||
Reference in New Issue
Block a user