summaryrefslogtreecommitdiff
path: root/t/t5503-tagfollow.sh
diff options
context:
space:
mode:
Diffstat (limited to 't/t5503-tagfollow.sh')
-rwxr-xr-xt/t5503-tagfollow.sh15
1 files changed, 9 insertions, 6 deletions
diff --git a/t/t5503-tagfollow.sh b/t/t5503-tagfollow.sh
index 6041a4d..195fc64 100755
--- a/t/t5503-tagfollow.sh
+++ b/t/t5503-tagfollow.sh
@@ -2,6 +2,9 @@
test_description='test automatic tag following'
+GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main
+export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME
+
. ./test-lib.sh
# End state of the repository:
@@ -11,7 +14,7 @@ test_description='test automatic tag following'
# L - A ------ O ------ B
# \ \ \
# \ C - origin/cat \
-# origin/master master
+# origin/main main
test_expect_success setup '
test_tick &&
@@ -57,7 +60,7 @@ test_expect_success 'fetch A (new commit : 1 connection)' '
(
cd cloned &&
GIT_TRACE_PACKET=$UPATH git fetch &&
- test $A = $(git rev-parse --verify origin/master)
+ test $A = $(git rev-parse --verify origin/main)
) &&
get_needs $U >actual &&
test_cmp expect actual
@@ -72,7 +75,7 @@ test_expect_success "create tag T on A, create C on branch cat" '
git add file &&
git commit -m C &&
C=$(git rev-parse --verify HEAD) &&
- git checkout master
+ git checkout main
'
test_expect_success 'setup expect' '
@@ -123,7 +126,7 @@ test_expect_success 'fetch B, S (commit and tag : 1 connection)' '
(
cd cloned &&
GIT_TRACE_PACKET=$UPATH git fetch &&
- test $B = $(git rev-parse --verify origin/master) &&
+ test $B = $(git rev-parse --verify origin/main) &&
test $B = $(git rev-parse --verify tag2^0) &&
test $S = $(git rev-parse --verify tag2)
) &&
@@ -138,7 +141,7 @@ want $S
EOF
'
-test_expect_success 'new clone fetch master and tags' '
+test_expect_success 'new clone fetch main and tags' '
test_might_fail git branch -D cat &&
rm -f $U &&
(
@@ -147,7 +150,7 @@ test_expect_success 'new clone fetch master and tags' '
git init &&
git remote add origin .. &&
GIT_TRACE_PACKET=$UPATH git fetch &&
- test $B = $(git rev-parse --verify origin/master) &&
+ test $B = $(git rev-parse --verify origin/main) &&
test $S = $(git rev-parse --verify tag2) &&
test $B = $(git rev-parse --verify tag2^0) &&
test $T = $(git rev-parse --verify tag1) &&