11
GIT_TEST_PROTOCOL_VERSION=0
12
export GIT_TEST_PROTOCOL_VERSION
13
14
+GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=master
15
+export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME
16
+
17
. ./test-lib.sh
18
19
+test_have_prereq PREPARE_FOR_MAIN_BRANCH || {
20
+ test_skip="In transit for the default branch name 'main'"
21
+ test_done
22
+}
23
+
24
build_script () {
25
script="$1" &&
18
- for i in one three_file master topic_2 one_tree three two two2 three2
26
+ for i in one three_file main topic_2 one_tree three two two2 three2
27
do
28
echo "s/$(test_oid --hash=sha1 "$i")/$(test_oid "$i")/g" >>"$script"
29
done
48
three_file sha1:0e3b14047d3ee365f4f2a1b673db059c3972589c
49
three_file sha256:bc4447d50c07497a8bfe6eef817f2364ecca9d471452e43b52756cc1a908bd32
50
43
- master sha1:6c9dec2b923228c9ff994c6cfe4ae16c12408dc5
44
- master sha256:8521c3072461fcfe8f32d67f95cc6e6b832a2db2fa29769ffc788bce85ebcd75
51
+ main sha1:ecf3b3627b498bdcb735cc4343bf165f76964e9a
52
+ main sha256:fff666109892bb4b1c80cd1649d2d8762a0663db8b5d46c8be98360b64fbba5f
53
54
one_tree sha1:22feea448b023a2d864ef94b013735af34d238ba
55
one_tree sha256:6e4743f4ef2356b881dda5e91f5c7cdffe870faf350bf7b312f80a20935f5d83
60
two sha1:525b7fb068d59950d185a8779dc957c77eed73ba
61
two sha256:3b21de3440cd38c2a9e9b464adb923f7054949ed4c918e1a0ac4c95cd52774db
62
55
- topic_2 sha1:754b754407bf032e9a2f9d5a9ad05ca79a6b228f
56
- topic_2 sha256:6c7abaea8a6d8ef4d89877e68462758dc6774690fbbbb0e6d7dd57415c9abde0
63
+ topic_2 sha1:b4ab76b1a01ea602209932134a44f1e6bd610832
64
+ topic_2 sha256:380ebae0113f877ce46fcdf39d5bc33e4dc0928db5c5a4d5fdc78381c4d55ae3
65
66
two2 sha1:6134ee8f857693b96ff1cc98d3e2fd62b199e5a8
67
two2 sha256:87a2d3ee29c83a3dc7afd41c0606b11f67603120b910a7be7840accdc18344d4
88
git tag -a -m "Tag Three file" tag-three-file HEAD^{tree}:file &&
89
git branch three &&
90
83
- echo master >> file &&
84
- git commit -a -m Master &&
85
- git tag -a -m "Tag Master" tag-master &&
91
+ echo main >> file &&
92
+ git commit -a -m Main &&
93
+ git tag -a -m "Tag Main" tag-main &&
94
95
git checkout three &&
96
99
git config remote.origin.url ../.git/ &&
100
101
git config remote.config-explicit.url ../.git/ &&
94
- git config remote.config-explicit.fetch refs/heads/master:remotes/rem/master &&
102
+ git config remote.config-explicit.fetch refs/heads/main:remotes/rem/main &&
103
git config --add remote.config-explicit.fetch refs/heads/one:remotes/rem/one &&
104
git config --add remote.config-explicit.fetch two:remotes/rem/two &&
105
git config --add remote.config-explicit.fetch refs/heads/three:remotes/rem/three &&
112
mkdir -p .git/remotes &&
113
{
114
echo "URL: ../.git/"
107
- echo "Pull: refs/heads/master:remotes/rem/master"
115
+ echo "Pull: refs/heads/main:remotes/rem/main"
116
echo "Pull: refs/heads/one:remotes/rem/one"
117
echo "Pull: two:remotes/rem/two"
118
echo "Pull: refs/heads/three:remotes/rem/three"
157
# but does depend on Pull: or fetch lines.
158
# Use two branches completely unrelated from the arguments,
159
# the clone default and one without branch properties
152
-for branch in master br-unconfig ; do
160
+for branch in main br-unconfig ; do
161
echo $branch
162
for remote in $remotes ; do
163
echo $branch $remote
166
167
# Merge logic does not depend on branch properties
168
# neither in the Pull: or .fetch config
161
-for branch in master br-unconfig ; do
169
+for branch in main br-unconfig ; do
170
cat <<EOF
171
$branch ../.git
172
$branch ../.git one