summaryrefslogtreecommitdiff
path: root/t/t7400-submodule-basic.sh
diff options
context:
space:
mode:
Diffstat (limited to 't/t7400-submodule-basic.sh')
-rwxr-xr-xt/t7400-submodule-basic.sh27
1 files changed, 15 insertions, 12 deletions
diff --git a/t/t7400-submodule-basic.sh b/t/t7400-submodule-basic.sh
index fec7e0299d..a924fdb7a6 100755
--- a/t/t7400-submodule-basic.sh
+++ b/t/t7400-submodule-basic.sh
@@ -9,6 +9,9 @@ This test tries to verify basic sanity of the init, update and status
subcommands of git submodule.
'
+GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main
+export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME
+
. ./test-lib.sh
test_expect_success 'submodule deinit works on empty repository' '
@@ -52,7 +55,7 @@ test_expect_success 'add aborts on repository with no commits' '
EOF
git init repo-no-commits &&
test_must_fail git submodule add ../a ./repo-no-commits 2>actual &&
- test_i18ncmp expect actual
+ test_cmp expect actual
'
test_expect_success 'status should ignore inner git repo when not added' '
@@ -124,7 +127,7 @@ inspect() {
}
test_expect_success 'submodule add' '
- echo "refs/heads/master" >expect &&
+ echo "refs/heads/main" >expect &&
(
cd addtest &&
@@ -182,7 +185,7 @@ test_expect_success 'submodule add to .gitignored path fails' '
git add --force .gitignore &&
git commit -m"Ignore everything" &&
! git submodule add "$submodurl" submod >actual 2>&1 &&
- test_i18ncmp expect actual
+ test_cmp expect actual
)
'
@@ -223,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
(
@@ -241,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 &&
@@ -257,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 &&
@@ -273,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 &&
@@ -289,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 &&
@@ -305,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 &&
@@ -335,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 &&
(
@@ -557,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' '
@@ -574,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
'