summaryrefslogtreecommitdiff
path: root/t/t6120-describe.sh
diff options
context:
space:
mode:
authorJohannes Schindelin <johannes.schindelin@gmx.de>2020-11-18 23:44:36 (GMT)
committerJunio C Hamano <gitster@pobox.com>2020-11-19 23:44:18 (GMT)
commit1550bb6ed0055895fe90a8b1eda95408ddf0d813 (patch)
tree3c87d38eb2cf6d37edb2f6762773ad70fba5fea5 /t/t6120-describe.sh
parent95cf2c01875fd66421d3551e9e86db435523575d (diff)
downloadgit-1550bb6ed0055895fe90a8b1eda95408ddf0d813.zip
git-1550bb6ed0055895fe90a8b1eda95408ddf0d813.tar.gz
git-1550bb6ed0055895fe90a8b1eda95408ddf0d813.tar.bz2
t6[0-3]*: adjust the references to the default branch name "main"
Carefully excluding t6300, which sees independent development elsewhere at the time of writing, we use `main` as the default branch name in t6[0-3]*. This trick was performed via $ (cd t && sed -i -e 's/master/main/g' -e 's/MASTER/MAIN/g' \ -e 's/Master/Main/g' -- t6[0-3]*.sh && git checkout HEAD -- t6300\*) 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/t6120-describe.sh')
-rwxr-xr-xt/t6120-describe.sh22
1 files changed, 11 insertions, 11 deletions
diff --git a/t/t6120-describe.sh b/t/t6120-describe.sh
index 360e65d..546796f 100755
--- a/t/t6120-describe.sh
+++ b/t/t6120-describe.sh
@@ -11,7 +11,7 @@ test_description='test describe'
#
# First parent of a merge commit is on the same line, second parent below.
-GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=master
+GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main
export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME
. ./test-lib.sh
@@ -105,7 +105,7 @@ check_describe c-* --tags HEAD^^2
check_describe B --tags HEAD^^2^
check_describe e --tags HEAD^^^
-check_describe heads/master --all HEAD
+check_describe heads/main --all HEAD
check_describe tags/c-* --all HEAD^
check_describe tags/e --all HEAD^^^
@@ -406,15 +406,15 @@ test_expect_success ULIMIT_STACK_SIZE 'name-rev works in a deep repo' '
i=1 &&
while test $i -lt 8000
do
- echo "commit refs/heads/master
+ echo "commit refs/heads/main
committer A U Thor <author@example.com> $((1000000000 + $i * 100)) +0200
data <<EOF
commit #$i
EOF"
- test $i = 1 && echo "from refs/heads/master^0"
+ test $i = 1 && echo "from refs/heads/main^0"
i=$(($i + 1))
done | git fast-import &&
- git checkout master &&
+ git checkout main &&
git tag far-far-away HEAD^ &&
echo "HEAD~4000 tags/far-far-away~3999" >expect &&
git name-rev HEAD~4000 >actual &&
@@ -445,7 +445,7 @@ test_expect_success 'describe complains about missing object' '
'
test_expect_success 'name-rev a rev shortly after epoch' '
- test_when_finished "git checkout master" &&
+ test_when_finished "git checkout main" &&
git checkout --orphan no-timestamp-underflow &&
# Any date closer to epoch than the CUTOFF_DATE_SLOP constant
@@ -459,7 +459,7 @@ test_expect_success 'name-rev a rev shortly after epoch' '
test_cmp expect actual
'
-# A--------------master
+# A--------------main
# \ /
# \----------M2
# \ /
@@ -490,10 +490,10 @@ test_expect_success 'name-rev covers all conditions while looking at parents' '
git checkout $A &&
git merge --no-ff HEAD@{1} && # M2
- git checkout master &&
+ git checkout main &&
git merge --no-ff HEAD@{1} &&
- echo "$B master^2^2~1^2" >expect &&
+ echo "$B main^2^2~1^2" >expect &&
git name-rev $B >actual &&
test_cmp expect actual
@@ -519,7 +519,7 @@ test_expect_success 'describe commits with disjoint bases' '
git checkout --orphan branch && rm file &&
echo B > file2 && git add file2 && git commit -m B &&
git tag B -a -m B &&
- git merge --no-ff --allow-unrelated-histories master -m x &&
+ git merge --no-ff --allow-unrelated-histories main -m x &&
check_describe "A-3-*" HEAD
)
@@ -545,7 +545,7 @@ test_expect_success 'describe commits with disjoint bases 2' '
echo o >> file2 && git add file2 && GIT_COMMITTER_DATE="2020-01-01 15:01" git commit -m o &&
echo B >> file2 && git add file2 && GIT_COMMITTER_DATE="2020-01-01 15:02" git commit -m B &&
git tag B -a -m B &&
- git merge --no-ff --allow-unrelated-histories master -m x &&
+ git merge --no-ff --allow-unrelated-histories main -m x &&
check_describe "B-3-*" HEAD
)