t6[4-9]*: adjust the references to the default branch name "main"
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[4-9]*.sh) 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>
Johannes Schindelin committed
Nov 18, 2020 at 23:44 UTC
5902f5f4608c1857fc04dcae2a0ce6beea31c8f8
27 files changed
+190
-190
t/t6400-merge-df.sh
+4
-4
@@ -4,7 +4,7 @@
4
#
5
6
test_description='Test merge with directory/file conflicts'
7
-GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=master
7
+GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main
8
export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME
9
10
. ./test-lib.sh
@@ -27,12 +27,12 @@ test_expect_success 'prepare repository' '
27
'
28
29
test_expect_success 'Merge with d/f conflicts' '
30
- test_expect_code 1 git merge -m "merge msg" master
30
+ test_expect_code 1 git merge -m "merge msg" main
31
'
32
33
test_expect_success 'F/D conflict' '
34
git reset --hard &&
35
- git checkout master &&
35
+ git checkout main &&
36
rm .git/index &&
37
38
mkdir before &&
@@ -50,7 +50,7 @@ test_expect_success 'F/D conflict' '
50
git add . &&
51
git commit -m para &&
52
53
- git merge master
53
+ git merge main
54
'
55
56
test_expect_success 'setup modify/delete + directory/file conflict' '
t/t6402-merge-rename.sh
+24
-24
@@ -1,7 +1,7 @@
1
#!/bin/sh
2
3
test_description='Merge-recursive merging renames'
4
-GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=master
4
+GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main
5
export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME
6
7
. ./test-lib.sh
@@ -57,9 +57,9 @@ test_expect_success 'setup' '
57
git branch change &&
58
git branch change+rename &&
59
60
- sed -e "/^g /s/.*/g : master changes a line/" <A >A+ &&
60
+ sed -e "/^g /s/.*/g : main changes a line/" <A >A+ &&
61
mv A+ A &&
62
- git commit -a -m "master updates A" &&
62
+ git commit -a -m "main updates A" &&
63
64
git checkout yellow &&
65
rm -f M &&
@@ -97,7 +97,7 @@ test_expect_success 'setup' '
97
git update-index --add B &&
98
git commit -q -a -m "changed and renamed" &&
99
100
- git checkout master
100
+ git checkout main
101
'
102
103
test_expect_success 'pull renaming branch into unrenaming one' \
@@ -112,7 +112,7 @@ test_expect_success 'pull renaming branch into unrenaming one' \
112
sed -ne "/^g/{
113
p
114
q
115
- }" B | grep master &&
115
+ }" B | grep main &&
116
git diff --exit-code white N
117
'
118
@@ -137,7 +137,7 @@ test_expect_success 'pull unrenaming branch into renaming one' \
137
'
138
git reset --hard &&
139
git show-branch &&
140
- test_expect_code 1 git pull . master &&
140
+ test_expect_code 1 git pull . main &&
141
git ls-files -u B >b.stages &&
142
test_line_count = 3 b.stages &&
143
git ls-files -s N >n.stages &&
@@ -190,7 +190,7 @@ test_expect_success 'interference with untracked working tree file' '
190
test_expect_success 'interference with untracked working tree file' '
191
git reset --hard &&
192
rm -f A M &&
193
- git checkout -f master &&
193
+ git checkout -f main &&
194
git tag -f anchor &&
195
git show-branch &&
196
git pull . yellow &&
@@ -201,7 +201,7 @@ test_expect_success 'interference with untracked working tree file' '
201
test_expect_success 'updated working tree file should prevent the merge' '
202
git reset --hard &&
203
rm -f A M &&
204
- git checkout -f master &&
204
+ git checkout -f main &&
205
git tag -f anchor &&
206
git show-branch &&
207
echo >>M one line addition &&
@@ -214,7 +214,7 @@ test_expect_success 'updated working tree file should prevent the merge' '
214
test_expect_success 'updated working tree file should prevent the merge' '
215
git reset --hard &&
216
rm -f A M &&
217
- git checkout -f master &&
217
+ git checkout -f main &&
218
git tag -f anchor &&
219
git show-branch &&
220
echo >>M one line addition &&
@@ -232,7 +232,7 @@ test_expect_success 'interference with untracked working tree file' '
232
git tag -f anchor &&
233
git show-branch &&
234
echo >M this file should not matter &&
235
- git pull . master &&
235
+ git pull . main &&
236
test_path_is_file M &&
237
! {
238
git ls-files -s |
@@ -767,7 +767,7 @@ test_expect_success 'setup avoid unnecessary update, dir->(file,nothing)' '
767
git rm -rf df &&
768
git commit -mB &&
769
770
- git checkout master &&
770
+ git checkout main &&
771
git rm -rf df &&
772
echo bla >df &&
773
git add -A &&
@@ -775,7 +775,7 @@ test_expect_success 'setup avoid unnecessary update, dir->(file,nothing)' '
775
'
776
777
test_expect_success 'avoid unnecessary update, dir->(file,nothing)' '
778
- git checkout -q master^0 &&
778
+ git checkout -q main^0 &&
779
test-tool chmtime --get -3600 df >expect &&
780
git merge side &&
781
test-tool chmtime --get df >actual &&
@@ -797,14 +797,14 @@ test_expect_success 'setup avoid unnecessary update, modify/delete' '
797
git rm -f file &&
798
git commit -m "Delete file" &&
799
800
- git checkout master &&
800
+ git checkout main &&
801
echo bla >file &&
802
git add -A &&
803
git commit -m "Modify file"
804
'
805
806
test_expect_success 'avoid unnecessary update, modify/delete' '
807
- git checkout -q master^0 &&
807
+ git checkout -q main^0 &&
808
test-tool chmtime --get -3600 file >expect &&
809
test_must_fail git merge side &&
810
test-tool chmtime --get file >actual &&
@@ -826,13 +826,13 @@ test_expect_success 'setup avoid unnecessary update, rename/add-dest' '
826
git add -A &&
827
git commit -m "Add file copy" &&
828
829
- git checkout master &&
829
+ git checkout main &&
830
git mv file newfile &&
831
git commit -m "Rename file"
832
'
833
834
test_expect_success 'avoid unnecessary update, rename/add-dest' '
835
- git checkout -q master^0 &&
835
+ git checkout -q main^0 &&
836
test-tool chmtime --get -3600 newfile >expect &&
837
git merge side &&
838
test-tool chmtime --get newfile >actual &&
@@ -882,15 +882,15 @@ test_expect_success 'setup for use of extended merge markers' '
882
git mv original_file renamed_file &&
883
git commit -mB &&
884
885
- git checkout master &&
885
+ git checkout main &&
886
echo 8.5 >>original_file &&
887
git add original_file &&
888
git commit -mC
889
'
890
891
-test_expect_success 'merge master into rename has correct extended markers' '
891
+test_expect_success 'merge main into rename has correct extended markers' '
892
git checkout rename^0 &&
893
- test_must_fail git merge -s recursive master^0 &&
893
+ test_must_fail git merge -s recursive main^0 &&
894
895
cat >expected <<-\EOF &&
896
1
@@ -905,14 +905,14 @@ test_expect_success 'merge master into rename has correct extended markers' '
905
9
906
=======
907
8.5
908
- >>>>>>> master^0:original_file
908
+ >>>>>>> main^0:original_file
909
EOF
910
test_cmp expected renamed_file
911
'
912
913
-test_expect_success 'merge rename into master has correct extended markers' '
913
+test_expect_success 'merge rename into main has correct extended markers' '
914
git reset --hard &&
915
- git checkout master^0 &&
915
+ git checkout main^0 &&
916
test_must_fail git merge -s recursive rename^0 &&
917
918
cat >expected <<-\EOF &&
@@ -948,13 +948,13 @@ test_expect_success 'setup spurious "refusing to lose untracked" message' '
948
git mv original_file renamed_file &&
949
git commit -mB &&
950
951
- git checkout master &&
951
+ git checkout main &&
952
git rm original_file &&
953
git commit -mC
954
'
955
956
test_expect_success 'no spurious "refusing to lose untracked" message' '
957
- git checkout master^0 &&
957
+ git checkout main^0 &&
958
test_must_fail git merge rename^0 2>errors.txt &&
959
! grep "refusing to lose untracked file" errors.txt
960
'
t/t6404-recursive-merge.sh
+3
-3
@@ -1,7 +1,7 @@
1
#!/bin/sh
2
3
test_description='Test merge without common ancestors'
4
-GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=master
4
+GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main
5
export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME
6
7
. ./test-lib.sh
@@ -22,11 +22,11 @@ test_expect_success 'setup tests' '
22
git add a1 &&
23
GIT_AUTHOR_DATE="2006-12-12 23:00:00" git commit -m 1 a1 &&
24
25
- git checkout -b A master &&
25
+ git checkout -b A main &&
26
echo A >a1 &&
27
GIT_AUTHOR_DATE="2006-12-12 23:00:01" git commit -m A a1 &&
28
29
- git checkout -b B master &&
29
+ git checkout -b B main &&
30
echo B >a1 &&
31
GIT_AUTHOR_DATE="2006-12-12 23:00:02" git commit -m B a1 &&
32
t/t6405-merge-symlinks.sh
+8
-8
@@ -8,7 +8,7 @@ test_description='merging symlinks on filesystem w/o symlink support.
8
This tests that git merge-recursive writes merge results as plain files
9
if core.symlinks is false.'
10
11
-GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=master
11
+GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main
12
export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME
13
14
. ./test-lib.sh
@@ -22,7 +22,7 @@ test_expect_success 'setup' '
22
git branch b-file &&
23
l=$(printf file | git hash-object -t blob -w --stdin) &&
24
echo "120000 $l symlink" | git update-index --index-info &&
25
- git commit -m master &&
25
+ git commit -m main &&
26
git checkout b-symlink &&
27
l=$(printf file-different | git hash-object -t blob -w --stdin) &&
28
echo "120000 $l symlink" | git update-index --index-info &&
@@ -33,28 +33,28 @@ test_expect_success 'setup' '
33
git commit -m b-file
34
'
35
36
-test_expect_success 'merge master into b-symlink, which has a different symbolic link' '
36
+test_expect_success 'merge main into b-symlink, which has a different symbolic link' '
37
git checkout b-symlink &&
38
- test_must_fail git merge master
38
+ test_must_fail git merge main
39
'
40
41
test_expect_success 'the merge result must be a file' '
42
test_path_is_file symlink
43
'
44
45
-test_expect_success 'merge master into b-file, which has a file instead of a symbolic link' '
45
+test_expect_success 'merge main into b-file, which has a file instead of a symbolic link' '
46
git reset --hard &&
47
git checkout b-file &&
48
- test_must_fail git merge master
48
+ test_must_fail git merge main
49
'
50
51
test_expect_success 'the merge result must be a file' '
52
test_path_is_file symlink
53
'
54
55
-test_expect_success 'merge b-file, which has a file instead of a symbolic link, into master' '
55
+test_expect_success 'merge b-file, which has a file instead of a symbolic link, into main' '
56
git reset --hard &&
57
- git checkout master &&
57
+ git checkout main &&
58
test_must_fail git merge b-file
59
'
60
t/t6406-merge-attr.sh
+13
-13
@@ -5,7 +5,7 @@
5
6
test_description='per path merge controlled by merge attribute'
7
8
-GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=master
8
+GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main
9
export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME
10
11
. ./test-lib.sh
@@ -22,10 +22,10 @@ test_expect_success setup '
22
git branch side &&
23
for f in text binary union
24
do
25
- echo Master >>$f && git add $f || return 1
25
+ echo Main >>$f && git add $f || return 1
26
done &&
27
test_tick &&
28
- git commit -m Master &&
28
+ git commit -m Main &&
29
30
git checkout side &&
31
for f in text binary union
@@ -67,7 +67,7 @@ test_expect_success merge '
67
echo "union merge=union"
68
} >.gitattributes &&
69
70
- if git merge master
70
+ if git merge main
71
then
72
echo Gaah, should have conflicted
73
false
@@ -90,7 +90,7 @@ test_expect_success 'check merge result in working tree' '
90
grep "<<<<<<<" text &&
91
cmp binary-orig binary &&
92
! grep "<<<<<<<" union &&
93
- grep Master union &&
93
+ grep Main union &&
94
grep Side union
95
96
'
@@ -118,13 +118,13 @@ test_expect_success 'custom merge backend' '
118
git config --replace-all \
119
merge.custom.name "custom merge driver for testing" &&
120
121
- git merge master &&
121
+ git merge main &&
122
123
cmp binary union &&
124
sed -e 1,3d text >check-1 &&
125
- o=$(git unpack-file master^:text) &&
125
+ o=$(git unpack-file main^:text) &&
126
a=$(git unpack-file side^:text) &&
127
- b=$(git unpack-file master:text) &&
127
+ b=$(git unpack-file main:text) &&
128
sh -c "./custom-merge $o $a $b 0 text" &&
129
sed -e 1,3d $a >check-2 &&
130
cmp check-1 check-2 &&
@@ -139,7 +139,7 @@ test_expect_success 'custom merge backend' '
139
git config --replace-all \
140
merge.custom.name "custom merge driver for testing" &&
141
142
- if git merge master
142
+ if git merge main
143
then
144
echo "Eh? should have conflicted"
145
false
@@ -149,9 +149,9 @@ test_expect_success 'custom merge backend' '
149
150
cmp binary union &&
151
sed -e 1,3d text >check-1 &&
152
- o=$(git unpack-file master^:text) &&
152
+ o=$(git unpack-file main^:text) &&
153
a=$(git unpack-file anchor:text) &&
154
- b=$(git unpack-file master:text) &&
154
+ b=$(git unpack-file main:text) &&
155
sh -c "./custom-merge $o $a $b 0 text" &&
156
sed -e 1,3d $a >check-2 &&
157
cmp check-1 check-2 &&
@@ -179,7 +179,7 @@ test_expect_success 'up-to-date merge without common ancestor' '
179
test_tick &&
180
(
181
cd repo1 &&
182
- git fetch ../repo2 master &&
182
+ git fetch ../repo2 main &&
183
git merge --allow-unrelated-histories FETCH_HEAD
184
)
185
'
@@ -204,7 +204,7 @@ test_expect_success 'custom merge does not lock index' '
204
# By packaging the command in test_when_finished, we get both
205
# the correctness check and the clean-up.
206
test_when_finished "kill \$(cat sleep.pid)" &&
207
- git merge master
207
+ git merge main
208
'
209
210
test_done
t/t6407-merge-binary.sh
+4
-4
@@ -2,7 +2,7 @@
2
3
test_description='ask merge-recursive to merge binary files'
4
5
-GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=master
5
+GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main
6
export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME
7
8
. ./test-lib.sh
@@ -23,7 +23,7 @@ test_expect_success setup '
23
git ls-files -s a >E0 &&
24
git ls-files -s m | sed -e "s/ 0 / 3 /" >E3 &&
25
test_tick &&
26
- git commit -m "master adds some" &&
26
+ git commit -m "main adds some" &&
27
28
git checkout side &&
29
echo rezrov >>m &&
@@ -42,7 +42,7 @@ test_expect_success resolve '
42
rm -f a* m* &&
43
git reset --hard anchor &&
44
45
- if git merge -s resolve master
45
+ if git merge -s resolve main
46
then
47
echo Oops, should not have succeeded
48
false
@@ -57,7 +57,7 @@ test_expect_success recursive '
57
rm -f a* m* &&
58
git reset --hard anchor &&
59
60
- if git merge -s recursive master
60
+ if git merge -s recursive main
61
then
62
echo Oops, should not have succeeded
63
false
t/t6409-merge-subtree.sh
+9
-9
@@ -2,7 +2,7 @@
2
3
test_description='subtree merge strategy'
4
5
-GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=master
5
+GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main
6
export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME
7
8
. ./test-lib.sh
@@ -17,10 +17,10 @@ test_expect_success setup '
17
echo >>hello world &&
18
git add hello &&
19
git commit -m second &&
20
- git checkout master &&
20
+ git checkout main &&
21
for i in mundo $s; do echo $i; done >hello &&
22
git add hello &&
23
- git commit -m master
23
+ git commit -m main
24
25
'
26
@@ -39,7 +39,7 @@ test_expect_success 'setup branch sub' '
39
'
40
41
test_expect_success 'setup topic branch' '
42
- git checkout -b topic master &&
42
+ git checkout -b topic main &&
43
git merge -s ours --no-commit --allow-unrelated-histories sub &&
44
git read-tree --prefix=dir/ -u sub &&
45
git commit -m "initial merge of sub into topic" &&
@@ -80,8 +80,8 @@ test_expect_success 'setup' '
80
81
test_expect_success 'initial merge' '
82
git remote add -f gui ../git-gui &&
83
- git merge -s ours --no-commit --allow-unrelated-histories gui/master &&
84
- git read-tree --prefix=git-gui/ -u gui/master &&
83
+ git merge -s ours --no-commit --allow-unrelated-histories gui/main &&
84
+ git read-tree --prefix=git-gui/ -u gui/main &&
85
git commit -m "Merge git-gui as our subdirectory" &&
86
git checkout -b work &&
87
git ls-files -s >actual &&
@@ -111,10 +111,10 @@ test_expect_success 'merge update' '
111
112
test_expect_success 'initial ambiguous subtree' '
113
cd ../git &&
114
- git reset --hard master &&
114
+ git reset --hard main &&
115
git checkout -b topic_2 &&
116
- git merge -s ours --no-commit gui/master &&
117
- git read-tree --prefix=git-gui2/ -u gui/master &&
116
+ git merge -s ours --no-commit gui/main &&
117
+ git read-tree --prefix=git-gui2/ -u gui/main &&
118
git commit -m "Merge git-gui2 as our subdirectory" &&
119
git checkout -b work2 &&
120
git ls-files -s >actual &&
t/t6411-merge-filemode.sh
+6
-6
@@ -1,7 +1,7 @@
1
#!/bin/sh
2
3
test_description='merge: handle file mode'
4
-GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=master
4
+GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main
5
export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME
6
7
. ./test-lib.sh
@@ -10,11 +10,11 @@ test_expect_success 'set up mode change in one branch' '
10
: >file1 &&
11
git add file1 &&
12
git commit -m initial &&
13
- git checkout -b a1 master &&
13
+ git checkout -b a1 main &&
14
: >dummy &&
15
git add dummy &&
16
git commit -m a &&
17
- git checkout -b b1 master &&
17
+ git checkout -b b1 main &&
18
test_chmod +x file1 &&
19
git add file1 &&
20
git commit -m b1
@@ -42,12 +42,12 @@ do_one_mode resolve b1 a1
42
43
test_expect_success 'set up mode change in both branches' '
44
git reset --hard HEAD &&
45
- git checkout -b a2 master &&
45
+ git checkout -b a2 main &&
46
: >file2 &&
47
H=$(git hash-object file2) &&
48
test_chmod +x file2 &&
49
git commit -m a2 &&
50
- git checkout -b b2 master &&
50
+ git checkout -b b2 main &&
51
: >file2 &&
52
git add file2 &&
53
git commit -m b2 &&
@@ -79,7 +79,7 @@ do_both_modes resolve
79
80
test_expect_success 'set up delete/modechange scenario' '
81
git reset --hard &&
82
- git checkout -b deletion master &&
82
+ git checkout -b deletion main &&
83
git rm file1 &&
84
git commit -m deletion
85
'
t/t6412-merge-large-rename.sh
+4
-4
@@ -1,7 +1,7 @@
1
#!/bin/sh
2
3
test_description='merging with large rename matrix'
4
-GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=master
4
+GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main
5
export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME
6
7
. ./test-lib.sh
@@ -33,7 +33,7 @@ test_rename() {
33
test_expect_success "rename ($1, $2)" '
34
n='$1' &&
35
expect='$2' &&
36
- git checkout -f master &&
36
+ git checkout -f main &&
37
test_might_fail git branch -D test$n &&
38
git reset --hard initial &&
39
for i in $(count $n); do
@@ -53,8 +53,8 @@ test_rename() {
53
git add . &&
54
git commit -m change+rename=$n &&
55
case "$expect" in
56
- ok) git merge master ;;
57
- *) test_must_fail git merge master ;;
56
+ ok) git merge main ;;
57
+ *) test_must_fail git merge main ;;
58
esac
59
'
60
}
t/t6413-merge-crlf.sh
+2
-2
@@ -8,7 +8,7 @@ test_description='merge conflict in crlf repo
8
9
'
10
11
-GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=master
11
+GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main
12
export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME
13
14
. ./test-lib.sh
@@ -27,7 +27,7 @@ test_expect_success setup '
27
echo line from b | append_cr >file &&
28
git commit -m "add line from b" file &&
29
git tag b &&
30
- git checkout master
30
+ git checkout main
31
'
32
33
test_expect_success 'Check "ours" is CRLF' '
t/t6414-merge-rename-nocruft.sh
+2
-2
@@ -1,7 +1,7 @@
1
#!/bin/sh
2
3
test_description='Merge-recursive merging renames'
4
-GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=master
4
+GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main
5
export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME
6
7
. ./test-lib.sh
@@ -68,7 +68,7 @@ test_expect_success 'setup' '
68
git update-index A &&
69
git commit -m "blue modify A" &&
70
71
- git checkout master
71
+ git checkout main
72
'
73
74
# This test broke in 65ac6e9c3f47807cb603af07a6a9e1a43bc119ae
t/t6415-merge-dir-to-symlink.sh
+12
-12
@@ -1,7 +1,7 @@
1
#!/bin/sh
2
3
test_description='merging when a directory was replaced with a symlink'
4
-GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=master
4
+GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main
5
export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME
6
7
. ./test-lib.sh
@@ -22,7 +22,7 @@ test_expect_success 'create a commit where dir a/b changed to symlink' '
22
23
test_expect_success 'checkout does not clobber untracked symlink' '
24
git checkout HEAD^0 &&
25
- git reset --hard master &&
25
+ git reset --hard main &&
26
git rm --cached a/b &&
27
git commit -m "untracked symlink remains" &&
28
test_must_fail git checkout start^0
@@ -30,7 +30,7 @@ test_expect_success 'checkout does not clobber untracked symlink' '
30
31
test_expect_success 'a/b-2/c/d is kept when clobbering symlink b' '
32
git checkout HEAD^0 &&
33
- git reset --hard master &&
33
+ git reset --hard main &&
34
git rm --cached a/b &&
35
git commit -m "untracked symlink remains" &&
36
git checkout -f start^0 &&
@@ -39,7 +39,7 @@ test_expect_success 'a/b-2/c/d is kept when clobbering symlink b' '
39
40
test_expect_success 'checkout should not have deleted a/b-2/c/d' '
41
git checkout HEAD^0 &&
42
- git reset --hard master &&
42
+ git reset --hard main &&
43
git checkout start^0 &&
44
test_path_is_file a/b-2/c/d
45
'
@@ -56,7 +56,7 @@ test_expect_success 'setup for merge test' '
56
test_expect_success 'Handle D/F conflict, do not lose a/b-2/c/d in merge (resolve)' '
57
git reset --hard &&
58
git checkout baseline^0 &&
59
- git merge -s resolve master &&
59
+ git merge -s resolve main &&
60
test_path_is_file a/b-2/c/d
61
'
62
@@ -67,7 +67,7 @@ test_expect_success SYMLINKS 'a/b was resolved as symlink' '
67
test_expect_success 'Handle D/F conflict, do not lose a/b-2/c/d in merge (recursive)' '
68
git reset --hard &&
69
git checkout baseline^0 &&
70
- git merge -s recursive master &&
70
+ git merge -s recursive main &&
71
test_path_is_file a/b-2/c/d
72
'
73
@@ -77,7 +77,7 @@ test_expect_success SYMLINKS 'a/b was resolved as symlink' '
77
78
test_expect_success 'Handle F/D conflict, do not lose a/b-2/c/d in merge (resolve)' '
79
git reset --hard &&
80
- git checkout master^0 &&
80
+ git checkout main^0 &&
81
git merge -s resolve baseline^0 &&
82
test_path_is_file a/b-2/c/d
83
'
@@ -88,7 +88,7 @@ test_expect_success SYMLINKS 'a/b was resolved as symlink' '
88
89
test_expect_success 'Handle F/D conflict, do not lose a/b-2/c/d in merge (recursive)' '
90
git reset --hard &&
91
- git checkout master^0 &&
91
+ git checkout main^0 &&
92
git merge -s recursive baseline^0 &&
93
test_path_is_file a/b-2/c/d
94
'
@@ -101,7 +101,7 @@ test_expect_failure 'do not lose untracked in merge (resolve)' '
101
git reset --hard &&
102
git checkout baseline^0 &&
103
>a/b/c/e &&
104
- test_must_fail git merge -s resolve master &&
104
+ test_must_fail git merge -s resolve main &&
105
test_path_is_file a/b/c/e &&
106
test_path_is_file a/b-2/c/d
107
'
@@ -110,7 +110,7 @@ test_expect_success 'do not lose untracked in merge (recursive)' '
110
git reset --hard &&
111
git checkout baseline^0 &&
112
>a/b/c/e &&
113
- test_must_fail git merge -s recursive master &&
113
+ test_must_fail git merge -s recursive main &&
114
test_path_is_file a/b/c/e &&
115
test_path_is_file a/b-2/c/d
116
'
@@ -119,14 +119,14 @@ test_expect_success 'do not lose modifications in merge (resolve)' '
119
git reset --hard &&
120
git checkout baseline^0 &&
121
echo more content >>a/b/c/d &&
122
- test_must_fail git merge -s resolve master
122
+ test_must_fail git merge -s resolve main
123
'
124
125
test_expect_success 'do not lose modifications in merge (recursive)' '
126
git reset --hard &&
127
git checkout baseline^0 &&
128
echo more content >>a/b/c/d &&
129
- test_must_fail git merge -s recursive master
129
+ test_must_fail git merge -s recursive main
130
'
131
132
test_expect_success 'setup a merge where dir a/b-2 changed to symlink' '
t/t6416-recursive-corner-cases.sh
+15
-15
@@ -2,7 +2,7 @@
2
3
test_description='recursive merge corner cases involving criss-cross merges'
4
5
-GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=master
5
+GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main
6
export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME
7
8
. ./test-lib.sh
@@ -388,7 +388,7 @@ test_expect_success 'git detects conflict merging criss-cross+modify/delete' '
388
test_line_count = 2 out &&
389
390
git rev-parse >expect \
391
- master:file B:file &&
391
+ main:file B:file &&
392
git rev-parse >actual \
393
:1:file :2:file &&
394
test_cmp expect actual
@@ -410,7 +410,7 @@ test_expect_success 'git detects conflict merging criss-cross+modify/delete, rev
410
test_line_count = 2 out &&
411
412
git rev-parse >expect \
413
- master:file B:file &&
413
+ main:file B:file &&
414
git rev-parse >actual \
415
:1:file :3:file &&
416
test_cmp expect actual
@@ -1556,12 +1556,12 @@ test_expect_failure 'check conflicting modes for regular file' '
1556
# Setup:
1557
# L1---L2
1558
# / \ / \
1559
-# master X ?
1559
+# main X ?
1560
# \ / \ /
1561
# R1---R2
1562
#
1563
# Where:
1564
-# master has two files, named 'b' and 'a'
1564
+# main has two files, named 'b' and 'a'
1565
# branches L1 and R1 both modify each of the two files in conflicting ways
1566
#
1567
# L2 is a merge of R1 into L1; more on it later.
@@ -1666,7 +1666,7 @@ test_expect_success 'check nested conflicts' '
1666
cd nested_conflicts &&
1667
1668
git clean -f &&
1669
- MASTER=$(git rev-parse --short master) &&
1669
+ MAIN=$(git rev-parse --short main) &&
1670
git checkout L2^0 &&
1671
1672
# Merge must fail; there is a conflict
@@ -1682,24 +1682,24 @@ test_expect_success 'check nested conflicts' '
1682
test_line_count = 1 out &&
1683
1684
# Create a and b from virtual merge base X
1685
- git cat-file -p master:a >base &&
1685
+ git cat-file -p main:a >base &&
1686
git cat-file -p L1:a >ours &&
1687
git cat-file -p R1:a >theirs &&
1688
test_must_fail git merge-file --diff3 \
1689
-L "Temporary merge branch 1" \
1690
- -L "$MASTER" \
1690
+ -L "$MAIN" \
1691
-L "Temporary merge branch 2" \
1692
ours \
1693
base \
1694
theirs &&
1695
sed -e "s/^\([<|=>]\)/\1\1/" ours >vmb_a &&
1696
1697
- git cat-file -p master:b >base &&
1697
+ git cat-file -p main:b >base &&
1698
git cat-file -p L1:b >ours &&
1699
git cat-file -p R1:b >theirs &&
1700
test_must_fail git merge-file --diff3 \
1701
-L "Temporary merge branch 1" \
1702
- -L "$MASTER" \
1702
+ -L "$MAIN" \
1703
-L "Temporary merge branch 2" \
1704
ours \
1705
base \
@@ -1751,12 +1751,12 @@ test_expect_success 'check nested conflicts' '
1751
# Setup:
1752
# L1---L2---L3
1753
# / \ / \ / \
1754
-# master X1 X2 ?
1754
+# main X1 X2 ?
1755
# \ / \ / \ /
1756
# R1---R2---R3
1757
#
1758
# Where:
1759
-# master has one file named 'content'
1759
+# main has one file named 'content'
1760
# branches L1 and R1 both modify each of the two files in conflicting ways
1761
#
1762
# L<n> (n>1) is a merge of R<n-1> into L<n-1>
@@ -1837,7 +1837,7 @@ test_expect_success 'check virtual merge base with nested conflicts' '
1837
(
1838
cd virtual_merge_base_has_nested_conflicts &&
1839
1840
- MASTER=$(git rev-parse --short master) &&
1840
+ MAIN=$(git rev-parse --short main) &&
1841
git checkout L3^0 &&
1842
1843
# Merge must fail; there is a conflict
@@ -1860,13 +1860,13 @@ test_expect_success 'check virtual merge base with nested conflicts' '
1860
# Imitate X1 merge base, except without long enough conflict
1861
# markers because a subsequent sed will modify them. Put
1862
# result into vmb.
1863
- git cat-file -p master:content >base &&
1863
+ git cat-file -p main:content >base &&
1864
git cat-file -p L:content >left &&
1865
git cat-file -p R:content >right &&
1866
cp left merged-once &&
1867
test_must_fail git merge-file --diff3 \
1868
-L "Temporary merge branch 1" \
1869
- -L "$MASTER" \
1869
+ -L "$MAIN" \
1870
-L "Temporary merge branch 2" \
1871
merged-once \
1872
base \
t/t6417-merge-ours-theirs.sh
+15
-15
@@ -1,7 +1,7 @@
1
#!/bin/sh
2
3
test_description='Merge-recursive ours and theirs variants'
4
-GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=master
4
+GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main
5
export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME
6
7
. ./test-lib.sh
@@ -23,11 +23,11 @@ test_expect_success setup '
23
sed -e "s/9/nueve/" >file <elif &&
24
git commit -a -m theirs &&
25
26
- git checkout master^0
26
+ git checkout main^0
27
'
28
29
test_expect_success 'plain recursive - should conflict' '
30
- git reset --hard master &&
30
+ git reset --hard main &&
31
test_must_fail git merge -s recursive side &&
32
grep nine file &&
33
grep nueve file &&
@@ -37,7 +37,7 @@ test_expect_success 'plain recursive - should conflict' '
37
'
38
39
test_expect_success 'recursive favouring theirs' '
40
- git reset --hard master &&
40
+ git reset --hard main &&
41
git merge -s recursive -Xtheirs side &&
42
! grep nine file &&
43
grep nueve file &&
@@ -47,7 +47,7 @@ test_expect_success 'recursive favouring theirs' '
47
'
48
49
test_expect_success 'recursive favouring ours' '
50
- git reset --hard master &&
50
+ git reset --hard main &&
51
git merge -s recursive -X ours side &&
52
grep nine file &&
53
! grep nueve file &&
@@ -59,26 +59,26 @@ test_expect_success 'recursive favouring ours' '
59
test_expect_success 'binary file with -Xours/-Xtheirs' '
60
echo file binary >.gitattributes &&
61
62
- git reset --hard master &&
62
+ git reset --hard main &&
63
git merge -s recursive -X theirs side &&
64
git diff --exit-code side HEAD -- file &&
65
66
- git reset --hard master &&
66
+ git reset --hard main &&
67
git merge -s recursive -X ours side &&
68
- git diff --exit-code master HEAD -- file
68
+ git diff --exit-code main HEAD -- file
69
'
70
71
test_expect_success 'pull passes -X to underlying merge' '
72
- git reset --hard master && git pull -s recursive -Xours . side &&
73
- git reset --hard master && git pull -s recursive -X ours . side &&
74
- git reset --hard master && git pull -s recursive -Xtheirs . side &&
75
- git reset --hard master && git pull -s recursive -X theirs . side &&
76
- git reset --hard master && test_must_fail git pull -s recursive -X bork . side
72
+ git reset --hard main && git pull -s recursive -Xours . side &&
73
+ git reset --hard main && git pull -s recursive -X ours . side &&
74
+ git reset --hard main && git pull -s recursive -Xtheirs . side &&
75
+ git reset --hard main && git pull -s recursive -X theirs . side &&
76
+ git reset --hard main && test_must_fail git pull -s recursive -X bork . side
77
'
78
79
test_expect_success SYMLINKS 'symlink with -Xours/-Xtheirs' '
80
- git reset --hard master &&
81
- git checkout -b two master &&
80
+ git reset --hard main &&
81
+ git checkout -b two main &&
82
ln -s target-zero link &&
83
git add link &&
84
git commit -m "add link pointing to zero" &&
t/t6418-merge-text-auto.sh
+7
-7
@@ -2,17 +2,17 @@
2
3
test_description='CRLF merge conflict across text=auto change
4
5
-* [master] remove .gitattributes
5
+* [main] remove .gitattributes
6
! [side] add line from b
7
--
8
+ [side] add line from b
9
-* [master] remove .gitattributes
10
-* [master^] add line from a
11
-* [master~2] normalize file
9
+* [main] remove .gitattributes
10
+* [main^] add line from a
11
+* [main~2] normalize file
12
*+ [side^] Initial
13
'
14
15
-GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=master
15
+GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main
16
export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME
17
18
. ./test-lib.sh
@@ -67,7 +67,7 @@ test_expect_success setup '
67
git commit -m "add line from b" &&
68
git tag b &&
69
70
- git checkout master
70
+ git checkout main
71
'
72
73
test_expect_success 'set up fuzz_conflict() helper' '
@@ -198,7 +198,7 @@ test_expect_success 'Test delete/normalize conflict' '
198
git reset --hard initial &&
199
git rm file &&
200
git commit -m "remove file" &&
201
- git checkout master &&
201
+ git checkout main &&
202
git reset --hard a^ &&
203
git merge side &&
204
test_path_is_missing file
t/t6419-merge-ignorecase.sh
+6
-6
@@ -2,7 +2,7 @@
2
3
test_description='git-merge with case-changing rename on case-insensitive file system'
4
5
-GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=master
5
+GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main
6
export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME
7
8
. ./test-lib.sh
@@ -23,18 +23,18 @@ test_expect_success 'merge with case-changing rename' '
23
>foo &&
24
git add foo &&
25
git commit -m "intervening commit" &&
26
- git checkout master &&
26
+ git checkout main &&
27
git rm TestCase &&
28
>testcase &&
29
git add testcase &&
30
git commit -m "rename to testcase" &&
31
git checkout with-camel &&
32
- git merge master -m "merge" &&
32
+ git merge main -m "merge" &&
33
test_path_is_file testcase
34
'
35
36
test_expect_success 'merge with case-changing rename on both sides' '
37
- git checkout master &&
37
+ git checkout main &&
38
git reset --hard baseline &&
39
git branch -D with-camel &&
40
git checkout -b with-camel &&
@@ -43,13 +43,13 @@ test_expect_success 'merge with case-changing rename on both sides' '
43
>foo &&
44
git add foo &&
45
git commit -m "intervening commit" &&
46
- git checkout master &&
46
+ git checkout main &&
47
git rm TestCase &&
48
>testcase &&
49
git add testcase &&
50
git commit -m "rename to testcase" &&
51
git checkout with-camel &&
52
- git merge master -m "merge" &&
52
+ git merge main -m "merge" &&
53
test_path_is_file testcase
54
'
55
t/t6422-merge-rename-corner-cases.sh
+7
-7
@@ -3,7 +3,7 @@
3
test_description="recursive merge corner cases w/ renames but not criss-crosses"
4
# t6036 has corner cases that involve both criss-cross merges and renames
5
6
-GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=master
6
+GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main
7
export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME
8
9
. ./test-lib.sh
@@ -1133,7 +1133,7 @@ test_conflicts_with_adds_and_renames() {
1133
# Setup:
1134
# L
1135
# / \
1136
- # master ?
1136
+ # main ?
1137
# \ /
1138
# R
1139
#
@@ -1263,7 +1263,7 @@ test_conflicts_with_adds_and_renames() {
1263
:2:three \
1264
:3:three &&
1265
git rev-parse >expected \
1266
- master:irrelevant_file \
1266
+ main:irrelevant_file \
1267
file_v2 \
1268
file_v4 &&
1269
test_cmp expected actual &&
@@ -1293,12 +1293,12 @@ test_conflicts_with_adds_and_renames add add
1293
# Setup:
1294
# L
1295
# / \
1296
-# master ?
1296
+# main ?
1297
# \ /
1298
# R
1299
#
1300
# Where:
1301
-# master has two files, named 'one' and 'two'.
1301
+# main has two files, named 'one' and 'two'.
1302
# branches L and R both modify 'one', in conflicting ways.
1303
# branches L and R both modify 'two', in conflicting ways.
1304
# branch L also renames 'one' to 'three'.
@@ -1379,7 +1379,7 @@ test_expect_success 'check nested conflicts from rename/rename(2to1)' '
1379
test_line_count = 1 out &&
1380
1381
# Compare :2:three to expected values
1382
- git cat-file -p master:one >base &&
1382
+ git cat-file -p main:one >base &&
1383
git cat-file -p L:three >ours &&
1384
git cat-file -p R:one >theirs &&
1385
test_must_fail git merge-file \
@@ -1390,7 +1390,7 @@ test_expect_success 'check nested conflicts from rename/rename(2to1)' '
1390
test_cmp expect L-three &&
1391
1392
# Compare :2:three to expected values
1393
- git cat-file -p master:two >base &&
1393
+ git cat-file -p main:two >base &&
1394
git cat-file -p L:two >ours &&
1395
git cat-file -p R:three >theirs &&
1396
test_must_fail git merge-file \
t/t6425-merge-rename-delete.sh
+2
-2
@@ -1,7 +1,7 @@
1
#!/bin/sh
2
3
test_description='Merge-recursive rename/delete conflict message'
4
-GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=master
4
+GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main
5
export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME
6
7
. ./test-lib.sh
@@ -15,7 +15,7 @@ test_expect_success 'rename/delete' '
15
git mv A B &&
16
git commit -m "rename" &&
17
18
- git checkout master &&
18
+ git checkout main &&
19
git rm A &&
20
git commit -m "delete" &&
21
t/t6427-diff3-conflict-markers.sh
+8
-8
@@ -2,7 +2,7 @@
2
3
test_description='recursive merge diff3 style conflict markers'
4
5
-GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=master
5
+GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main
6
export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME
7
8
. ./test-lib.sh
@@ -46,7 +46,7 @@ test_expect_success 'check no merge base' '
46
# Setup:
47
# L1
48
# / \
49
-# master ?
49
+# main ?
50
# \ /
51
# R1
52
#
@@ -93,18 +93,18 @@ test_expect_success 'check unique merge base' '
93
cd unique_merge_base &&
94
95
git checkout L^0 &&
96
- MASTER=$(git rev-parse --short master) &&
96
+ MAIN=$(git rev-parse --short main) &&
97
98
test_must_fail git -c merge.conflictstyle=diff3 merge -s recursive R^0 &&
99
100
- grep "|||||| $MASTER:content" renamed
100
+ grep "|||||| $MAIN:content" renamed
101
)
102
'
103
104
# Setup:
105
# L1---L2--L3
106
# / \ / \
107
-# master X1 ?
107
+# main X1 ?
108
# \ / \ /
109
# R1---R2--R3
110
#
@@ -194,10 +194,10 @@ test_expect_success 'rebase --merge describes parent of commit being picked' '
194
(
195
cd rebase &&
196
test_commit base file &&
197
- test_commit master file &&
197
+ test_commit main file &&
198
git checkout -b side HEAD^ &&
199
test_commit side file &&
200
- test_must_fail git -c merge.conflictstyle=diff3 rebase --merge master &&
200
+ test_must_fail git -c merge.conflictstyle=diff3 rebase --merge main &&
201
grep "||||||| parent of" file
202
)
203
'
@@ -206,7 +206,7 @@ test_expect_success 'rebase --apply describes fake ancestor base' '
206
(
207
cd rebase &&
208
git rebase --abort &&
209
- test_must_fail git -c merge.conflictstyle=diff3 rebase --apply master &&
209
+ test_must_fail git -c merge.conflictstyle=diff3 rebase --apply main &&
210
grep "||||||| constructed merge base" file
211
)
212
'
t/t6430-merge-recursive.sh
+10
-10
@@ -2,7 +2,7 @@
2
3
test_description='merge-recursive backend test'
4
5
-GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=master
5
+GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main
6
export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME
7
8
. ./test-lib.sh
@@ -38,7 +38,7 @@ test_expect_success 'setup 1' '
38
git add a d/e &&
39
40
test_tick &&
41
- git commit -m "master modifies a and d/e" &&
41
+ git commit -m "main modifies a and d/e" &&
42
c1=$(git rev-parse --verify HEAD) &&
43
( git ls-tree -r HEAD && git ls-files -s ) >actual &&
44
(
@@ -469,7 +469,7 @@ test_expect_success SYMLINKS 'dir in working tree with symlink ancestor does not
469
git checkout -b branch1 &&
470
git commit --allow-empty -m "empty commit" &&
471
472
- git checkout master &&
472
+ git checkout main &&
473
git rm foo &&
474
mkdir foo &&
475
>foo/bar &&
@@ -478,7 +478,7 @@ test_expect_success SYMLINKS 'dir in working tree with symlink ancestor does not
478
479
git checkout branch1 &&
480
481
- git cherry-pick master &&
481
+ git cherry-pick main &&
482
test_path_is_dir foo &&
483
test_path_is_file foo/bar
484
)
@@ -493,8 +493,8 @@ test_expect_success 'reset and 3-way merge' '
493
494
test_expect_success 'reset and bind merge' '
495
496
- git reset --hard master &&
497
- git read-tree --prefix=M/ master &&
496
+ git reset --hard main &&
497
+ git read-tree --prefix=M/ main &&
498
git ls-files -s >actual &&
499
(
500
echo "100644 $o1 0 M/a" &&
@@ -508,7 +508,7 @@ test_expect_success 'reset and bind merge' '
508
) >expected &&
509
test_cmp expected actual &&
510
511
- git read-tree --prefix=a1/ master &&
511
+ git read-tree --prefix=a1/ main &&
512
git ls-files -s >actual &&
513
(
514
echo "100644 $o1 0 M/a" &&
@@ -526,7 +526,7 @@ test_expect_success 'reset and bind merge' '
526
) >expected &&
527
test_cmp expected actual &&
528
529
- git read-tree --prefix=z/ master &&
529
+ git read-tree --prefix=z/ main &&
530
git ls-files -s >actual &&
531
(
532
echo "100644 $o1 0 M/a" &&
@@ -602,11 +602,11 @@ test_expect_success 'merge-recursive w/ empty work tree - theirs has rename' '
602
603
test_expect_success 'merge removes empty directories' '
604
605
- git reset --hard master &&
605
+ git reset --hard main &&
606
git checkout -b rm &&
607
git rm d/e &&
608
git commit -mremoved-d/e &&
609
- git checkout master &&
609
+ git checkout main &&
610
git merge -s recursive rm &&
611
test_path_is_missing d
612
'
t/t6432-merge-recursive-space-options.sh
+4
-4
@@ -2,16 +2,16 @@
2
3
test_description='merge-recursive space options
4
5
-* [master] Clarify
5
+* [main] Clarify
6
! [remote] Remove cruft
7
--
8
+ [remote] Remove cruft
9
-* [master] Clarify
9
+* [main] Clarify
10
*+ [remote^] Initial revision
11
* ok 1: setup
12
'
13
14
-GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=master
14
+GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main
15
export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME
16
17
. ./test-lib.sh
@@ -90,7 +90,7 @@ test_expect_success 'setup' '
90
mv text.txt+ text.txt &&
91
git commit -a -m "Remove cruft" &&
92
93
- git checkout master &&
93
+ git checkout main &&
94
sed -e "
95
s/\(not in his right mind\),\(.*\)/\1;\2Q/
96
s/Quite correct\(.*\)/It is too correct\1Q/
t/t6433-merge-toplevel.sh
+5
-5
@@ -2,13 +2,13 @@
2
3
test_description='"git merge" top-level frontend'
4
5
-GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=master
5
+GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main
6
export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME
7
8
. ./test-lib.sh
9
10
t3033_reset () {
11
- git checkout -B master two &&
11
+ git checkout -B main two &&
12
git branch -f left three &&
13
git branch -f right four
14
}
@@ -24,7 +24,7 @@ test_expect_success setup '
24
test_commit four &&
25
git checkout --orphan newroot &&
26
test_commit five &&
27
- git checkout master
27
+ git checkout main
28
'
29
30
# Local branches
@@ -64,7 +64,7 @@ test_expect_success 'merge octopus, non-fast-forward (ff)' '
64
test_expect_success 'merge octopus, fast-forward (does not ff)' '
65
t3033_reset &&
66
git merge left right &&
67
- # two (master) is not an ancestor of three (left) and four (right)
67
+ # two (main) is not an ancestor of three (left) and four (right)
68
test_must_fail git rev-parse --verify HEAD^4 &&
69
git rev-parse HEAD^1 HEAD^2 HEAD^3 | sort >actual &&
70
git rev-parse two three four | sort >expect &&
@@ -121,7 +121,7 @@ test_expect_success 'merge FETCH_HEAD octopus fast-forward (does not ff)' '
121
t3033_reset &&
122
git fetch . left right &&
123
git merge FETCH_HEAD &&
124
- # two (master) is not an ancestor of three (left) and four (right)
124
+ # two (main) is not an ancestor of three (left) and four (right)
125
test_must_fail git rev-parse --verify HEAD^4 &&
126
git rev-parse HEAD^1 HEAD^2 HEAD^3 | sort >actual &&
127
git rev-parse two three four | sort >expect &&
t/t6434-merge-recursive-rename-options.sh
+4
-4
@@ -5,11 +5,11 @@ test_description='merge-recursive rename options
5
Test rename detection by examining rename/delete conflicts.
6
7
* (HEAD -> rename) rename
8
-| * (master) delete
8
+| * (main) delete
9
|/
10
* base
11
12
-git diff --name-status base master
12
+git diff --name-status base main
13
D 0-old
14
D 1-old
15
D 2-old
@@ -26,7 +26,7 @@ they are rounded down (see, e.g., Documentation/diff-generate-patch.txt, which
26
mentions this in a different context).
27
'
28
29
-GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=master
29
+GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main
30
export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME
31
32
. ./test-lib.sh
@@ -121,7 +121,7 @@ test_expect_success 'setup repo' '
121
get_expected_stages 2 &&
122
get_expected_stages 3 &&
123
check_50="false" &&
124
- tail="HEAD^ -- HEAD master"
124
+ tail="HEAD^ -- HEAD main"
125
'
126
127
test_expect_success 'setup thresholds' '
t/t6436-merge-overwrite.sh
+2
-2
@@ -4,7 +4,7 @@ test_description='git-merge
4
5
Do not overwrite changes.'
6
7
-GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=master
7
+GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main
8
export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME
9
10
. ./test-lib.sh
@@ -196,7 +196,7 @@ test_expect_success 'set up unborn branch and content' '
196
'
197
198
test_expect_success 'will not clobber WT/index when merging into unborn' '
199
- git merge master &&
199
+ git merge main &&
200
grep foo tracked-file &&
201
git show :tracked-file >expect &&
202
grep foo expect &&
t/t6437-submodule-merge.sh
+8
-8
@@ -2,7 +2,7 @@
2
3
test_description='merging with submodules'
4
5
-GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=master
5
+GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main
6
export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME
7
8
. ./test-lib.sh
@@ -30,7 +30,7 @@ test_expect_success setup '
30
test_tick &&
31
git commit -m root &&
32
33
- git checkout -b a master &&
33
+ git checkout -b a main &&
34
(cd sub &&
35
echo A > file &&
36
git add file &&
@@ -40,7 +40,7 @@ test_expect_success setup '
40
test_tick &&
41
git commit -m a &&
42
43
- git checkout -b b master &&
43
+ git checkout -b b main &&
44
(cd sub &&
45
echo B > file &&
46
git add file &&
@@ -257,22 +257,22 @@ test_expect_success 'setup for recursive merge with submodule' '
257
(cd sub &&
258
git init &&
259
test_commit a &&
260
- git checkout -b sub-b master &&
260
+ git checkout -b sub-b main &&
261
test_commit b &&
262
- git checkout -b sub-c master &&
262
+ git checkout -b sub-c main &&
263
test_commit c &&
264
git checkout -b sub-bc sub-b &&
265
git merge sub-c &&
266
git checkout -b sub-cb sub-c &&
267
git merge sub-b &&
268
- git checkout master) &&
268
+ git checkout main) &&
269
git add sub &&
270
git commit -m a &&
271
- git checkout -b top-b master &&
271
+ git checkout -b top-b main &&
272
(cd sub && git checkout sub-b) &&
273
git add sub &&
274
git commit -m b &&
275
- git checkout -b top-c master &&
275
+ git checkout -b top-c main &&
276
(cd sub && git checkout sub-c) &&
277
git add sub &&
278
git commit -m c &&
t/t6439-merge-co-error-msgs.sh
+4
-4
@@ -2,7 +2,7 @@
2
3
test_description='unpack-trees error messages'
4
5
-GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=master
5
+GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main
6
export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME
7
8
. ./test-lib.sh
@@ -21,7 +21,7 @@ test_expect_success 'setup' '
21
git add two three four five &&
22
git commit -m Second &&
23
24
- git checkout master &&
24
+ git checkout main &&
25
echo other >two &&
26
echo other >three &&
27
echo other >four &&
@@ -86,7 +86,7 @@ test_expect_success 'cannot switch branches because of local changes' '
86
echo two >rep/two &&
87
git add rep/one rep/two &&
88
git commit -m Fourth &&
89
- git checkout master &&
89
+ git checkout main &&
90
echo uno >rep/one &&
91
echo dos >rep/two &&
92
test_must_fail git checkout branch 2>out &&
@@ -131,7 +131,7 @@ test_expect_success 'not_uptodate_dir porcelain checkout error' '
131
>rep2 &&
132
git add rep rep2 &&
133
git commit -m "added test as a file" &&
134
- git checkout master &&
134
+ git checkout main &&
135
>rep/untracked-file &&
136
>rep2/untracked-file &&
137
test_must_fail git checkout branch 2>out &&
t/t6501-freshen-objects.sh
+2
-2
@@ -25,7 +25,7 @@
25
# to refer to an existing tree).
26
27
test_description='check pruning of dependent objects'
28
-GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=master
28
+GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main
29
export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME
30
31
. ./test-lib.sh
@@ -70,7 +70,7 @@ for repack in '' true; do
70
git checkout -b experiment &&
71
commit abandon &&
72
maybe_repack &&
73
- git checkout master &&
73
+ git checkout main &&
74
git branch -D experiment
75
'
76