t7[0-4]*: adjust the references to the default branch name "main"
Carefully excluding t7064, which sees independent development elsewhere at the time of writing, we use `main` as the default branch name in t7[0-4]*. 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[0-4]*.sh && git checkout HEAD -- t7064\*) 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>
This commit is contained in:
committed by
Junio C Hamano
parent
5902f5f460
commit
01dc81336d
@ -9,7 +9,7 @@ This test tries to verify basic sanity of the init, update and status
|
||||
subcommands of git submodule.
|
||||
'
|
||||
|
||||
GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=master
|
||||
GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main
|
||||
export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME
|
||||
|
||||
. ./test-lib.sh
|
||||
@ -127,7 +127,7 @@ inspect() {
|
||||
}
|
||||
|
||||
test_expect_success 'submodule add' '
|
||||
echo "refs/heads/master" >expect &&
|
||||
echo "refs/heads/main" >expect &&
|
||||
|
||||
(
|
||||
cd addtest &&
|
||||
@ -226,7 +226,7 @@ test_expect_success 'submodule add --branch' '
|
||||
echo "refs/heads/initial" >expect-head &&
|
||||
cat <<-\EOF >expect-heads &&
|
||||
refs/heads/initial
|
||||
refs/heads/master
|
||||
refs/heads/main
|
||||
EOF
|
||||
|
||||
(
|
||||
@ -244,7 +244,7 @@ test_expect_success 'submodule add --branch' '
|
||||
'
|
||||
|
||||
test_expect_success 'submodule add with ./ in path' '
|
||||
echo "refs/heads/master" >expect &&
|
||||
echo "refs/heads/main" >expect &&
|
||||
|
||||
(
|
||||
cd addtest &&
|
||||
@ -260,7 +260,7 @@ test_expect_success 'submodule add with ./ in path' '
|
||||
'
|
||||
|
||||
test_expect_success 'submodule add with /././ in path' '
|
||||
echo "refs/heads/master" >expect &&
|
||||
echo "refs/heads/main" >expect &&
|
||||
|
||||
(
|
||||
cd addtest &&
|
||||
@ -276,7 +276,7 @@ test_expect_success 'submodule add with /././ in path' '
|
||||
'
|
||||
|
||||
test_expect_success 'submodule add with // in path' '
|
||||
echo "refs/heads/master" >expect &&
|
||||
echo "refs/heads/main" >expect &&
|
||||
|
||||
(
|
||||
cd addtest &&
|
||||
@ -292,7 +292,7 @@ test_expect_success 'submodule add with // in path' '
|
||||
'
|
||||
|
||||
test_expect_success 'submodule add with /.. in path' '
|
||||
echo "refs/heads/master" >expect &&
|
||||
echo "refs/heads/main" >expect &&
|
||||
|
||||
(
|
||||
cd addtest &&
|
||||
@ -308,7 +308,7 @@ test_expect_success 'submodule add with /.. in path' '
|
||||
'
|
||||
|
||||
test_expect_success 'submodule add with ./, /.. and // in path' '
|
||||
echo "refs/heads/master" >expect &&
|
||||
echo "refs/heads/main" >expect &&
|
||||
|
||||
(
|
||||
cd addtest &&
|
||||
@ -338,7 +338,7 @@ test_expect_success !CYGWIN 'submodule add with \\ in path' '
|
||||
'
|
||||
|
||||
test_expect_success 'submodule add in subdirectory' '
|
||||
echo "refs/heads/master" >expect &&
|
||||
echo "refs/heads/main" >expect &&
|
||||
|
||||
mkdir addtest/sub &&
|
||||
(
|
||||
@ -560,7 +560,7 @@ test_expect_success 'status should be "up-to-date" after update' '
|
||||
|
||||
test_expect_success 'checkout superproject with subproject already present' '
|
||||
git checkout initial &&
|
||||
git checkout master
|
||||
git checkout main
|
||||
'
|
||||
|
||||
test_expect_success 'apply submodule diff' '
|
||||
@ -577,7 +577,7 @@ test_expect_success 'apply submodule diff' '
|
||||
git checkout second &&
|
||||
git apply --index P.diff &&
|
||||
|
||||
git diff --cached master >staged &&
|
||||
git diff --cached main >staged &&
|
||||
test_must_be_empty staged
|
||||
'
|
||||
|
||||
|
||||
Reference in New Issue
Block a user