@@ -11,11 +11,14 @@ test_description='Merge logic in fetch'
1111GIT_TEST_PROTOCOL_VERSION=0
1212export GIT_TEST_PROTOCOL_VERSION
1313
14+ GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main
15+ export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME
16+
1417. ./test-lib.sh
1518
1619build_script () {
1720 script=" $1 " &&
18- for i in one three_file master topic_2 one_tree three two two2 three2
21+ for i in one three_file main topic_2 one_tree three two two2 three2
1922 do
2023 echo " s/$( test_oid --hash=sha1 " $i " ) /$( test_oid " $i " ) /g" >> " $script "
2124 done
@@ -40,8 +43,8 @@ test_expect_success setup '
4043 three_file sha1:0e3b14047d3ee365f4f2a1b673db059c3972589c
4144 three_file sha256:bc4447d50c07497a8bfe6eef817f2364ecca9d471452e43b52756cc1a908bd32
4245
43- master sha1:6c9dec2b923228c9ff994c6cfe4ae16c12408dc5
44- master sha256:8521c3072461fcfe8f32d67f95cc6e6b832a2db2fa29769ffc788bce85ebcd75
46+ main sha1:ecf3b3627b498bdcb735cc4343bf165f76964e9a
47+ main sha256:fff666109892bb4b1c80cd1649d2d8762a0663db8b5d46c8be98360b64fbba5f
4548
4649 one_tree sha1:22feea448b023a2d864ef94b013735af34d238ba
4750 one_tree sha256:6e4743f4ef2356b881dda5e91f5c7cdffe870faf350bf7b312f80a20935f5d83
@@ -52,8 +55,8 @@ test_expect_success setup '
5255 two sha1:525b7fb068d59950d185a8779dc957c77eed73ba
5356 two sha256:3b21de3440cd38c2a9e9b464adb923f7054949ed4c918e1a0ac4c95cd52774db
5457
55- topic_2 sha1:754b754407bf032e9a2f9d5a9ad05ca79a6b228f
56- topic_2 sha256:6c7abaea8a6d8ef4d89877e68462758dc6774690fbbbb0e6d7dd57415c9abde0
58+ topic_2 sha1:b4ab76b1a01ea602209932134a44f1e6bd610832
59+ topic_2 sha256:380ebae0113f877ce46fcdf39d5bc33e4dc0928db5c5a4d5fdc78381c4d55ae3
5760
5861 two2 sha1:6134ee8f857693b96ff1cc98d3e2fd62b199e5a8
5962 two2 sha256:87a2d3ee29c83a3dc7afd41c0606b11f67603120b910a7be7840accdc18344d4
@@ -80,9 +83,9 @@ test_expect_success setup '
8083 git tag -a -m "Tag Three file" tag-three-file HEAD^{tree}:file &&
8184 git branch three &&
8285
83- echo master >> file &&
84- git commit -a -m Master &&
85- git tag -a -m "Tag Master " tag-master &&
86+ echo main >> file &&
87+ git commit -a -m Main &&
88+ git tag -a -m "Tag Main " tag-main &&
8689
8790 git checkout three &&
8891
@@ -91,7 +94,7 @@ test_expect_success setup '
9194 git config remote.origin.url ../.git/ &&
9295
9396 git config remote.config-explicit.url ../.git/ &&
94- git config remote.config-explicit.fetch refs/heads/master :remotes/rem/master &&
97+ git config remote.config-explicit.fetch refs/heads/main :remotes/rem/main &&
9598 git config --add remote.config-explicit.fetch refs/heads/one:remotes/rem/one &&
9699 git config --add remote.config-explicit.fetch two:remotes/rem/two &&
97100 git config --add remote.config-explicit.fetch refs/heads/three:remotes/rem/three &&
@@ -104,7 +107,7 @@ test_expect_success setup '
104107 mkdir -p .git/remotes &&
105108 {
106109 echo "URL: ../.git/"
107- echo "Pull: refs/heads/master :remotes/rem/master "
110+ echo "Pull: refs/heads/main :remotes/rem/main "
108111 echo "Pull: refs/heads/one:remotes/rem/one"
109112 echo "Pull: two:remotes/rem/two"
110113 echo "Pull: refs/heads/three:remotes/rem/three"
@@ -149,7 +152,7 @@ done > tests
149152# but does depend on Pull: or fetch lines.
150153# Use two branches completely unrelated from the arguments,
151154# the clone default and one without branch properties
152- for branch in master br-unconfig ; do
155+ for branch in main br-unconfig ; do
153156 echo $branch
154157 for remote in $remotes ; do
155158 echo $branch $remote
@@ -158,7 +161,7 @@ done >> tests
158161
159162# Merge logic does not depend on branch properties
160163# neither in the Pull: or .fetch config
161- for branch in master br-unconfig ; do
164+ for branch in main br-unconfig ; do
162165 cat << EOF
163166$branch ../.git
164167$branch ../.git one
0 commit comments