t34*: adjust the references to the default branch name "main"

Carefully excluding t3404, which sees independent development elsewhere at the time of writing, we use `main` as the default branch name in t34*. This trick was performed via $ (cd t && sed -i -e 's/master/main/g' -e 's/MASTER/MAIN/g' \ -e 's/Master/Main/g' -- t34*.sh && git checkout HEAD -- t34\*) 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 d1c02d93b3374e031f87f9032c5dc6ef9bfbe0af
23 files changed +253 -253
t/t3400-rebase.sh
+31 -31
@@ -8,7 +8,7 @@ test_description='git rebase assorted tests
8 This test runs git rebase and checks that the author information is not lost
9 among other things.
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,15 +27,15 @@ test_expect_success 'prepare repository with topic branches' '
27 git update-index --add Y &&
28 git commit -m "Add Y." &&
29 git checkout -b filemove &&
30 - git reset --soft master &&
30 + git reset --soft main &&
31 mkdir D &&
32 git mv A D/A &&
33 git commit -m "Move A." &&
34 - git checkout -b my-topic-branch master &&
34 + git checkout -b my-topic-branch main &&
35 echo Second >B &&
36 git update-index --add B &&
37 git commit -m "Add B." &&
38 - git checkout -f master &&
38 + git checkout -f main &&
39 echo Third >>A &&
40 git update-index A &&
41 git commit -m "Modify A." &&
@@ -49,23 +49,23 @@ test_expect_success 'prepare repository with topic branches' '
49
50 test_expect_success 'rebase on dirty worktree' '
51 echo dirty >>A &&
52 - test_must_fail git rebase master
52 + test_must_fail git rebase main
53 '
54
55 test_expect_success 'rebase on dirty cache' '
56 git add A &&
57 - test_must_fail git rebase master
57 + test_must_fail git rebase main
58 '
59
60 -test_expect_success 'rebase against master' '
60 +test_expect_success 'rebase against main' '
61 git reset --hard HEAD &&
62 - git rebase master
62 + git rebase main
63 '
64
65 test_expect_success 'rebase sets ORIG_HEAD to pre-rebase state' '
66 git checkout -b orig-head topic &&
67 pre="$(git rev-parse --verify HEAD)" &&
68 - git rebase master &&
68 + git rebase main &&
69 test_cmp_rev "$pre" ORIG_HEAD &&
70 test_cmp_rev ! "$pre" HEAD
71 '
@@ -96,19 +96,19 @@ test_expect_success 'HEAD was detached during rebase' '
96
97 test_expect_success 'rebase from ambiguous branch name' '
98 git checkout -b topic side &&
99 - git rebase master
99 + git rebase main
100 '
101
102 test_expect_success 'rebase off of the previous branch using "-"' '
103 - git checkout master &&
103 + git checkout main &&
104 git checkout HEAD^ &&
105 git rebase @{-1} >expect.messages &&
106 - git merge-base master HEAD >expect.forkpoint &&
106 + git merge-base main HEAD >expect.forkpoint &&
107
108 - git checkout master &&
108 + git checkout main &&
109 git checkout HEAD^ &&
110 git rebase - >actual.messages &&
111 - git merge-base master HEAD >actual.forkpoint &&
111 + git merge-base main HEAD >actual.forkpoint &&
112
113 test_cmp expect.forkpoint actual.forkpoint &&
114 # the next one is dubious---we may want to say "-",
@@ -117,7 +117,7 @@ test_expect_success 'rebase off of the previous branch using "-"' '
117 '
118
119 test_expect_success 'rebase a single mode change' '
120 - git checkout master &&
120 + git checkout main &&
121 git branch -D topic &&
122 echo 1 >X &&
123 git add X &&
@@ -129,7 +129,7 @@ test_expect_success 'rebase a single mode change' '
129 test_chmod +x A &&
130 test_tick &&
131 git commit -m modechange &&
132 - GIT_TRACE=1 git rebase master
132 + GIT_TRACE=1 git rebase main
133 '
134
135 test_expect_success 'rebase is not broken by diff.renames' '
@@ -165,11 +165,11 @@ test_expect_success 'fail when upstream arg is missing and not configured' '
165 test_expect_success 'rebase works with format.useAutoBase' '
166 test_config format.useAutoBase true &&
167 git checkout topic &&
168 - git rebase master
168 + git rebase main
169 '
170
171 test_expect_success 'default to common base in @{upstream}s reflog if no upstream arg (--merge)' '
172 - git checkout -b default-base master &&
172 + git checkout -b default-base main &&
173 git checkout -b default topic &&
174 git config branch.default.remote . &&
175 git config branch.default.merge refs/heads/default-base &&
@@ -187,7 +187,7 @@ test_expect_success 'default to common base in @{upstream}s reflog if no upstrea
187 '
188
189 test_expect_success 'default to common base in @{upstream}s reflog if no upstream arg (--apply)' '
190 - git checkout -B default-base master &&
190 + git checkout -B default-base main &&
191 git checkout -B default topic &&
192 git config branch.default.remote . &&
193 git config branch.default.merge refs/heads/default-base &&
@@ -229,13 +229,13 @@ test_expect_success 'cherry-picked commits and fork-point work together' '
229
230 test_expect_success 'rebase --apply -q is quiet' '
231 git checkout -b quiet topic &&
232 - git rebase --apply -q master >output.out 2>&1 &&
232 + git rebase --apply -q main >output.out 2>&1 &&
233 test_must_be_empty output.out
234 '
235
236 test_expect_success 'rebase --merge -q is quiet' '
237 git checkout -B quiet topic &&
238 - git rebase --merge -q master >output.out 2>&1 &&
238 + git rebase --merge -q main >output.out 2>&1 &&
239 test_must_be_empty output.out
240 '
241
@@ -297,7 +297,7 @@ test_expect_success 'rebase commit with an ancient timestamp' '
297 '
298
299 test_expect_success 'rebase with "From " line in commit message' '
300 - git checkout -b preserve-from master~1 &&
300 + git checkout -b preserve-from main~1 &&
301 cat >From_.msg <<EOF &&
302 Somebody embedded an mbox in a commit message
303
@@ -313,7 +313,7 @@ EOF
313 >From_ &&
314 git add From_ &&
315 git commit -F From_.msg &&
316 - git rebase master &&
316 + git rebase main &&
317 git log -1 --pretty=format:%B >out &&
318 test_cmp From_.msg out
319 '
@@ -360,12 +360,12 @@ test_expect_success 'rebase --apply and .gitattributes' '
360 git cherry-pick test &&
361
362 git checkout test &&
363 - git rebase master &&
363 + git rebase main &&
364 grep "smudged" a.txt &&
365
366 git checkout removal &&
367 git reset --hard &&
368 - git rebase master &&
368 + git rebase main &&
369 grep "clean" a.txt
370 )
371 '
@@ -405,20 +405,20 @@ test_expect_success 'rebase -c rebase.useBuiltin=false warning' '
405 '
406
407 test_expect_success 'switch to branch checked out here' '
408 - git checkout master &&
409 - git rebase master master
408 + git checkout main &&
409 + git rebase main main
410 '
411
412 test_expect_success 'switch to branch not checked out' '
413 - git checkout master &&
413 + git checkout main &&
414 git branch other &&
415 - git rebase master other
415 + git rebase main other
416 '
417
418 test_expect_success 'refuse to switch to branch checked out elsewhere' '
419 - git checkout master &&
419 + git checkout main &&
420 git worktree add wt &&
421 - test_must_fail git -C wt rebase master master 2>err &&
421 + test_must_fail git -C wt rebase main main 2>err &&
422 test_i18ngrep "already checked out" err
423 '
424
t/t3402-rebase-merge.sh
+23 -23
@@ -5,7 +5,7 @@
5
6 test_description='git rebase --merge test'
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 commit -m"initial" &&
23 git branch side &&
24 echo "11 $T" >>original &&
25 - git commit -a -m"master updates a bit." &&
25 + git commit -a -m"main updates a bit." &&
26
27 echo "12 $T" >>original &&
28 - git commit -a -m"master updates a bit more." &&
28 + git commit -a -m"main updates a bit more." &&
29
30 git checkout side &&
31 (echo "0 $T" && cat original) >renamed &&
@@ -50,13 +50,13 @@ test_expect_success setup '
50 '
51
52 test_expect_success 'reference merge' '
53 - git merge -s recursive -m "reference merge" master
53 + git merge -s recursive -m "reference merge" main
54 '
55
56 PRE_REBASE=$(git rev-parse test-rebase)
57 test_expect_success rebase '
58 git checkout test-rebase &&
59 - GIT_TRACE=1 git rebase --merge master
59 + GIT_TRACE=1 git rebase --merge main
60 '
61
62 test_expect_success 'test-rebase@{1} is pre rebase' '
@@ -75,24 +75,24 @@ test_expect_success 'merge and rebase should match' '
75 '
76
77 test_expect_success 'rebase the other way' '
78 - git reset --hard master &&
78 + git reset --hard main &&
79 git rebase --merge side
80 '
81
82 test_expect_success 'rebase -Xtheirs' '
83 - git checkout -b conflicting master~2 &&
83 + git checkout -b conflicting main~2 &&
84 echo "AB $T" >> original &&
85 git commit -mconflicting original &&
86 - git rebase -Xtheirs master &&
86 + git rebase -Xtheirs main &&
87 grep AB original &&
88 ! grep 11 original
89 '
90
91 test_expect_success 'rebase -Xtheirs from orphan' '
92 - git checkout --orphan orphan-conflicting master~2 &&
92 + git checkout --orphan orphan-conflicting main~2 &&
93 echo "AB $T" >> original &&
94 git commit -morphan-conflicting original &&
95 - git rebase -Xtheirs master &&
95 + git rebase -Xtheirs main &&
96 grep AB original &&
97 ! grep 11 original
98 '
@@ -110,9 +110,9 @@ test_expect_success 'merge and rebase should match' '
110
111 test_expect_success 'picking rebase' '
112 git reset --hard side &&
113 - git rebase --merge --onto master side^^ &&
114 - mb=$(git merge-base master HEAD) &&
115 - if test "$mb" = "$(git rev-parse master)"
113 + git rebase --merge --onto main side^^ &&
114 + mb=$(git merge-base main HEAD) &&
115 + if test "$mb" = "$(git rev-parse main)"
116 then
117 echo happy
118 else
@@ -143,11 +143,11 @@ test_expect_success 'rebase -s funny -Xopt' '
143 EOF
144 chmod +x test-bin/git-merge-funny &&
145 git reset --hard &&
146 - git checkout -b test-funny master^ &&
146 + git checkout -b test-funny main^ &&
147 test_commit funny &&
148 (
149 PATH=./test-bin:$PATH &&
150 - git rebase -s funny -Xopt master
150 + git rebase -s funny -Xopt main
151 ) &&
152 test -f funny.was.run
153 '
@@ -168,7 +168,7 @@ test_expect_success 'rebase --skip works with two conflicts in a row' '
168 test_expect_success '--reapply-cherry-picks' '
169 git init repo &&
170
171 - # O(1-10) -- O(1-11) -- O(0-10) master
171 + # O(1-10) -- O(1-11) -- O(0-10) main
172 # \
173 # -- O(1-11) -- O(1-12) otherbranch
174
@@ -190,18 +190,18 @@ test_expect_success '--reapply-cherry-picks' '
190 git -C repo commit -a -m "add 12 in another branch" &&
191
192 # Regular rebase fails, because the 1-11 commit is deduplicated
193 - test_must_fail git -C repo rebase --merge master 2> err &&
193 + test_must_fail git -C repo rebase --merge main 2> err &&
194 test_i18ngrep "error: could not apply.*add 12 in another branch" err &&
195 git -C repo rebase --abort &&
196
197 # With --reapply-cherry-picks, it works
198 - git -C repo rebase --merge --reapply-cherry-picks master
198 + git -C repo rebase --merge --reapply-cherry-picks main
199 '
200
201 test_expect_success '--reapply-cherry-picks refrains from reading unneeded blobs' '
202 git init server &&
203
204 - # O(1-10) -- O(1-11) -- O(1-12) master
204 + # O(1-10) -- O(1-11) -- O(1-12) main
205 # \
206 # -- O(0-10) otherbranch
207
@@ -223,18 +223,18 @@ test_expect_success '--reapply-cherry-picks refrains from reading unneeded blobs
223 test_config -C server uploadpack.allowanysha1inwant 1 &&
224
225 git clone --filter=blob:none "file://$(pwd)/server" client &&
226 - git -C client checkout origin/master &&
226 + git -C client checkout origin/main &&
227 git -C client checkout origin/otherbranch &&
228
229 # Sanity check to ensure that the blobs from the merge base and "add
230 # 11" are missing
231 git -C client rev-list --objects --all --missing=print >missing_list &&
232 - MERGE_BASE_BLOB=$(git -C server rev-parse master^^:file.txt) &&
233 - ADD_11_BLOB=$(git -C server rev-parse master^:file.txt) &&
232 + MERGE_BASE_BLOB=$(git -C server rev-parse main^^:file.txt) &&
233 + ADD_11_BLOB=$(git -C server rev-parse main^:file.txt) &&
234 grep "[?]$MERGE_BASE_BLOB" missing_list &&
235 grep "[?]$ADD_11_BLOB" missing_list &&
236
237 - git -C client rebase --merge --reapply-cherry-picks origin/master &&
237 + git -C client rebase --merge --reapply-cherry-picks origin/main &&
238
239 # The blob from the merge base had to be fetched, but not "add 11"
240 git -C client rev-list --objects --all --missing=print >missing_list &&
t/t3403-rebase-skip.sh
+4 -4
@@ -5,7 +5,7 @@
5
6 test_description='git rebase --merge --skip tests'
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
@@ -51,7 +51,7 @@ test_expect_success setup '
51 '
52
53 test_expect_success 'rebase with git am -3 (default)' '
54 - test_must_fail git rebase master
54 + test_must_fail git rebase main
55 '
56
57 test_expect_success 'rebase --skip can not be used with other options' '
@@ -67,7 +67,7 @@ test_expect_success 'rebase moves back to skip-reference' '
67 test refs/heads/skip-reference = $(git symbolic-ref HEAD) &&
68 git branch post-rebase &&
69 git reset --hard pre-rebase &&
70 - test_must_fail git rebase master &&
70 + test_must_fail git rebase main &&
71 echo "hello" > hello &&
72 git add hello &&
73 git rebase --continue &&
@@ -78,7 +78,7 @@ test_expect_success 'rebase moves back to skip-reference' '
78 test_expect_success 'checkout skip-merge' 'git checkout -f skip-merge'
79
80 test_expect_success 'rebase with --merge' '
81 - test_must_fail git rebase --merge master
81 + test_must_fail git rebase --merge main
82 '
83
84 test_expect_success 'rebase --skip with --merge' '
t/t3405-rebase-malformed.sh
+5 -5
@@ -2,7 +2,7 @@
2
3 test_description='rebase should handle arbitrary git message'
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
@@ -55,7 +55,7 @@ test_expect_success setup '
55 git add file3 &&
56 git commit --allow-empty-message -m "" &&
57
58 - git checkout master &&
58 + git checkout main &&
59
60 echo One >file1 &&
61 test_tick &&
@@ -65,7 +65,7 @@ test_expect_success setup '
65
66 test_expect_success 'rebase commit with multi-line subject' '
67
68 - git rebase master multi-line-subject &&
68 + git rebase main multi-line-subject &&
69 git cat-file commit HEAD | sed -e "1,/^\$/d" >F1 &&
70
71 test_cmp F0 F1 &&
@@ -73,14 +73,14 @@ test_expect_success 'rebase commit with multi-line subject' '
73 '
74
75 test_expect_success 'rebase commit with diff in message' '
76 - git rebase master diff-in-message &&
76 + git rebase main diff-in-message &&
77 git cat-file commit HEAD | sed -e "1,/^$/d" >G1 &&
78 test_cmp G0 G1 &&
79 test_cmp G G0
80 '
81
82 test_expect_success 'rebase -m commit with empty message' '
83 - git rebase -m master empty-message-merge
83 + git rebase -m main empty-message-merge
84 '
85
86 test_expect_success 'rebase -i commit with empty message' '
t/t3406-rebase-message.sh
+13 -13
@@ -2,7 +2,7 @@
2
3 test_description='messages from rebase operation'
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,27 +21,27 @@ test_expect_success 'setup' '
21 '
22
23 test_expect_success 'rebase -m' '
24 - git rebase -m master >actual &&
24 + git rebase -m main >actual &&
25 test_must_be_empty actual
26 '
27
28 -test_expect_success 'rebase against master twice' '
29 - git rebase --apply master >out &&
28 +test_expect_success 'rebase against main twice' '
29 + git rebase --apply main >out &&
30 test_i18ngrep "Current branch topic is up to date" out
31 '
32
33 -test_expect_success 'rebase against master twice with --force' '
34 - git rebase --force-rebase --apply master >out &&
33 +test_expect_success 'rebase against main twice with --force' '
34 + git rebase --force-rebase --apply main >out &&
35 test_i18ngrep "Current branch topic is up to date, rebase forced" out
36 '
37
38 -test_expect_success 'rebase against master twice from another branch' '
38 +test_expect_success 'rebase against main twice from another branch' '
39 git checkout topic^ &&
40 - git rebase --apply master topic >out &&
40 + git rebase --apply main topic >out &&
41 test_i18ngrep "Current branch topic is up to date" out
42 '
43
44 -test_expect_success 'rebase fast-forward to master' '
44 +test_expect_success 'rebase fast-forward to main' '
45 git checkout topic^ &&
46 git rebase --apply topic >out &&
47 test_i18ngrep "Fast-forwarded HEAD to topic" out
@@ -49,21 +49,21 @@ test_expect_success 'rebase fast-forward to master' '
49
50 test_expect_success 'rebase --stat' '
51 git reset --hard start &&
52 - git rebase --stat master >diffstat.txt &&
52 + git rebase --stat main >diffstat.txt &&
53 grep "^ fileX | *1 +$" diffstat.txt
54 '
55
56 test_expect_success 'rebase w/config rebase.stat' '
57 git reset --hard start &&
58 git config rebase.stat true &&
59 - git rebase master >diffstat.txt &&
59 + git rebase main >diffstat.txt &&
60 grep "^ fileX | *1 +$" diffstat.txt
61 '
62
63 test_expect_success 'rebase -n overrides config rebase.stat config' '
64 git reset --hard start &&
65 git config rebase.stat true &&
66 - git rebase -n master >diffstat.txt &&
66 + git rebase -n main >diffstat.txt &&
67 ! grep "^ fileX | *1 +$" diffstat.txt
68 '
69
@@ -116,7 +116,7 @@ test_expect_success 'rebase -i onto unrelated history' '
116 git init unrelated &&
117 test_commit -C unrelated 1 &&
118 git -C unrelated remote add -f origin "$PWD" &&
119 - git -C unrelated branch --set-upstream-to=origin/master &&
119 + git -C unrelated branch --set-upstream-to=origin/main &&
120 git -C unrelated -c core.editor=true rebase -i -v --stat >actual &&
121 test_i18ngrep "Changes to " actual &&
122 test_i18ngrep "5 files changed" actual
t/t3407-rebase-abort.sh
+10 -10
@@ -2,7 +2,7 @@
2
3 test_description='git rebase --abort tests'
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
@@ -40,7 +40,7 @@ testrebase() {
40 cd "$work_dir" &&
41 # Clean up the state from the previous one
42 git reset --hard pre-rebase &&
43 - test_must_fail git rebase$type master &&
43 + test_must_fail git rebase$type main &&
44 test_path_is_dir "$dotest" &&
45 git rebase --abort &&
46 test $(git rev-parse to-rebase) = $(git rev-parse pre-rebase) &&
@@ -51,10 +51,10 @@ testrebase() {
51 cd "$work_dir" &&
52 # Clean up the state from the previous one
53 git reset --hard pre-rebase &&
54 - test_must_fail git rebase$type master &&
54 + test_must_fail git rebase$type main &&
55 test_path_is_dir "$dotest" &&
56 test_must_fail git rebase --skip &&
57 - test $(git rev-parse HEAD) = $(git rev-parse master) &&
57 + test $(git rev-parse HEAD) = $(git rev-parse main) &&
58 git rebase --abort &&
59 test $(git rev-parse to-rebase) = $(git rev-parse pre-rebase) &&
60 test ! -d "$dotest"
@@ -64,13 +64,13 @@ testrebase() {
64 cd "$work_dir" &&
65 # Clean up the state from the previous one
66 git reset --hard pre-rebase &&
67 - test_must_fail git rebase$type master &&
67 + test_must_fail git rebase$type main &&
68 test_path_is_dir "$dotest" &&
69 echo c > a &&
70 echo d >> a &&
71 git add a &&
72 test_must_fail git rebase --continue &&
73 - test $(git rev-parse HEAD) != $(git rev-parse master) &&
73 + test $(git rev-parse HEAD) != $(git rev-parse main) &&
74 git rebase --abort &&
75 test $(git rev-parse to-rebase) = $(git rev-parse pre-rebase) &&
76 test ! -d "$dotest"
@@ -81,7 +81,7 @@ testrebase() {
81 # Clean up the state from the previous one
82 git reset --hard pre-rebase &&
83 git reflog show to-rebase > reflog_before &&
84 - test_must_fail git rebase$type master &&
84 + test_must_fail git rebase$type main &&
85 git rebase --abort &&
86 git reflog show to-rebase > reflog_after &&
87 test_cmp reflog_before reflog_after &&
@@ -92,7 +92,7 @@ testrebase() {
92 cd "$work_dir" &&
93 # Clean up the state from the previous one
94 git reset --hard pre-rebase &&
95 - test_must_fail git rebase$type master &&
95 + test_must_fail git rebase$type main &&
96 test_must_fail git rebase -v --abort &&
97 test_must_fail git rebase --abort -v &&
98 git rebase --abort
@@ -106,7 +106,7 @@ test_expect_success 'rebase --apply --quit' '
106 cd "$work_dir" &&
107 # Clean up the state from the previous one
108 git reset --hard pre-rebase &&
109 - test_must_fail git rebase --apply master &&
109 + test_must_fail git rebase --apply main &&
110 test_path_is_dir .git/rebase-apply &&
111 head_before=$(git rev-parse HEAD) &&
112 git rebase --quit &&
@@ -118,7 +118,7 @@ test_expect_success 'rebase --merge --quit' '
118 cd "$work_dir" &&
119 # Clean up the state from the previous one
120 git reset --hard pre-rebase &&
121 - test_must_fail git rebase --merge master &&
121 + test_must_fail git rebase --merge main &&
122 test_path_is_dir .git/rebase-merge &&
123 head_before=$(git rev-parse HEAD) &&
124 git rebase --quit &&
t/t3408-rebase-multi-line.sh
+2 -2
@@ -2,7 +2,7 @@
2
3 test_description='rebasing a commit with multi-line first paragraph.'
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
@@ -49,7 +49,7 @@ But otherwise with a sane description." side2 &&
49 test_expect_success rebase '
50
51 git checkout side &&
52 - git rebase master &&
52 + git rebase main &&
53 git cat-file commit HEAD | sed -e "1,/^\$/d" >actual &&
54 git cat-file commit side@{1} | sed -e "1,/^\$/d" >expect &&
55 test_cmp expect actual
t/t3409-rebase-preserve-merges.sh
+6 -6
@@ -6,7 +6,7 @@ test_description='git rebase -p should preserve merges
6
7 Run "git rebase -p" and check that merges are properly carried along
8 '
9 -GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=master
9 +GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main
10 export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME
11
12 . ./test-lib.sh
@@ -21,7 +21,7 @@ export GIT_AUTHOR_EMAIL
21
22 # Clone 2 (conflicting merge):
23 #
24 -# A1--A2--B3 <-- origin/master
24 +# A1--A2--B3 <-- origin/main
25 # \ \
26 # B1------M <-- topic
27 # \
@@ -29,7 +29,7 @@ export GIT_AUTHOR_EMAIL
29 #
30 # Clone 3 (no-ff merge):
31 #
32 -# A1--A2--B3 <-- origin/master
32 +# A1--A2--B3 <-- origin/main
33 # \
34 # B1------M <-- topic
35 # \ /
@@ -47,7 +47,7 @@ test_expect_success 'setup for merge-preserving rebase' \
47 echo Second > B &&
48 git add B &&
49 git commit -m "Add B1" &&
50 - git checkout -f master &&
50 + git checkout -f main &&
51 echo Third >> A &&
52 git commit -a -m "Modify A2" &&
53 echo Fifth > B &&
@@ -58,10 +58,10 @@ test_expect_success 'setup for merge-preserving rebase' \
58 (
59 cd clone2 &&
60 git checkout -b topic origin/topic &&
61 - test_must_fail git merge origin/master &&
61 + test_must_fail git merge origin/main &&
62 echo Resolved >B &&
63 git add B &&
64 - git commit -m "Merge origin/master into topic"
64 + git commit -m "Merge origin/main into topic"
65 ) &&
66
67 git clone ./. clone3 &&
t/t3412-rebase-root.sh
+15 -15
@@ -4,7 +4,7 @@ test_description='git rebase --root
4
5 Tests if git rebase --root --onto <newparent> can rebase the root commit.
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
@@ -27,7 +27,7 @@ test_expect_success 'prepare repository' '
27
28 test_expect_success 'rebase --root fails with too many args' '
29 git checkout -B fail other &&
30 - test_must_fail git rebase --onto master --root fail fail
30 + test_must_fail git rebase --onto main --root fail fail
31 '
32
33 test_expect_success 'setup pre-rebase hook' '
@@ -47,7 +47,7 @@ EOF
47
48 test_expect_success 'rebase --root --onto <newbase>' '
49 git checkout -b work other &&
50 - git rebase --root --onto master &&
50 + git rebase --root --onto main &&
51 git log --pretty=tformat:"%s" > rebased &&
52 test_cmp expect rebased
53 '
@@ -58,7 +58,7 @@ test_expect_success 'pre-rebase got correct input (1)' '
58
59 test_expect_success 'rebase --root --onto <newbase> <branch>' '
60 git branch work2 other &&
61 - git rebase --root --onto master work2 &&
61 + git rebase --root --onto main work2 &&
62 git log --pretty=tformat:"%s" > rebased2 &&
63 test_cmp expect rebased2
64 '
@@ -69,7 +69,7 @@ test_expect_success 'pre-rebase got correct input (2)' '
69
70 test_expect_success 'rebase -i --root --onto <newbase>' '
71 git checkout -b work3 other &&
72 - git rebase -i --root --onto master &&
72 + git rebase -i --root --onto main &&
73 git log --pretty=tformat:"%s" > rebased3 &&
74 test_cmp expect rebased3
75 '
@@ -80,7 +80,7 @@ test_expect_success 'pre-rebase got correct input (3)' '
80
81 test_expect_success 'rebase -i --root --onto <newbase> <branch>' '
82 git branch work4 other &&
83 - git rebase -i --root --onto master work4 &&
83 + git rebase -i --root --onto main work4 &&
84 git log --pretty=tformat:"%s" > rebased4 &&
85 test_cmp expect rebased4
86 '
@@ -91,7 +91,7 @@ test_expect_success 'pre-rebase got correct input (4)' '
91
92 test_expect_success REBASE_P 'rebase -i -p with linear history' '
93 git checkout -b work5 other &&
94 - git rebase -i -p --root --onto master &&
94 + git rebase -i -p --root --onto main &&
95 git log --pretty=tformat:"%s" > rebased5 &&
96 test_cmp expect rebased5
97 '
@@ -125,7 +125,7 @@ EOF
125
126 test_expect_success REBASE_P 'rebase -i -p with merge' '
127 git checkout -b work6 other &&
128 - git rebase -i -p --root --onto master &&
128 + git rebase -i -p --root --onto main &&
129 log_with_names work6 > rebased6 &&
130 test_cmp expect-side rebased6
131 '
@@ -160,7 +160,7 @@ EOF
160
161 test_expect_success REBASE_P 'rebase -i -p with two roots' '
162 git checkout -b work7 other &&
163 - git rebase -i -p --root --onto master &&
163 + git rebase -i -p --root --onto main &&
164 log_with_names work7 > rebased7 &&
165 test_cmp expect-third rebased7
166 '
@@ -176,14 +176,14 @@ EOF
176
177 test_expect_success 'pre-rebase hook stops rebase' '
178 git checkout -b stops1 other &&
179 - test_must_fail git rebase --root --onto master &&
179 + test_must_fail git rebase --root --onto main &&
180 test "z$(git symbolic-ref HEAD)" = zrefs/heads/stops1 &&
181 test 0 = $(git rev-list other...stops1 | wc -l)
182 '
183
184 test_expect_success 'pre-rebase hook stops rebase -i' '
185 git checkout -b stops2 other &&
186 - test_must_fail git rebase --root --onto master &&
186 + test_must_fail git rebase --root --onto main &&
187 test "z$(git symbolic-ref HEAD)" = zrefs/heads/stops2 &&
188 test 0 = $(git rev-list other...stops2 | wc -l)
189 '
@@ -193,7 +193,7 @@ test_expect_success 'remove pre-rebase hook' '
193 '
194
195 test_expect_success 'set up a conflict' '
196 - git checkout master &&
196 + git checkout main &&
197 echo conflict > B &&
198 git add B &&
199 git commit -m conflict
@@ -201,7 +201,7 @@ test_expect_success 'set up a conflict' '
201
202 test_expect_success 'rebase --root with conflict (first part)' '
203 git checkout -b conflict1 other &&
204 - test_must_fail git rebase --root --onto master &&
204 + test_must_fail git rebase --root --onto main &&
205 git ls-files -u | grep "B$"
206 '
207
@@ -228,7 +228,7 @@ test_expect_success 'rebase --root with conflict (second part)' '
228
229 test_expect_success 'rebase -i --root with conflict (first part)' '
230 git checkout -b conflict2 other &&
231 - test_must_fail git rebase -i --root --onto master &&
231 + test_must_fail git rebase -i --root --onto main &&
232 git ls-files -u | grep "B$"
233 '
234
@@ -266,7 +266,7 @@ EOF
266
267 test_expect_success REBASE_P 'rebase -i -p --root with conflict (first part)' '
268 git checkout -b conflict3 other &&
269 - test_must_fail git rebase -i -p --root --onto master &&
269 + test_must_fail git rebase -i -p --root --onto main &&
270 git ls-files -u | grep "B$"
271 '
272
t/t3413-rebase-hook.sh
+22 -22
@@ -2,7 +2,7 @@
2
3 test_description='git rebase with its hook(s)'
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 git &&
22 test_tick &&
23 git commit -m side &&
24 - git checkout master &&
24 + git checkout main &&
25 git log --pretty=oneline --abbrev-commit --graph --all &&
26 git branch test side
27 '
@@ -29,14 +29,14 @@ test_expect_success setup '
29 test_expect_success 'rebase' '
30 git checkout test &&
31 git reset --hard side &&
32 - git rebase master &&
32 + git rebase main &&
33 test "z$(cat git)" = zworld
34 '
35
36 test_expect_success 'rebase -i' '
37 git checkout test &&
38 git reset --hard side &&
39 - EDITOR=true git rebase -i master &&
39 + EDITOR=true git rebase -i main &&
40 test "z$(cat git)" = zworld
41 '
42
@@ -52,53 +52,53 @@ EOF
52 test_expect_success 'pre-rebase hook gets correct input (1)' '
53 git checkout test &&
54 git reset --hard side &&
55 - git rebase master &&
55 + git rebase main &&
56 test "z$(cat git)" = zworld &&
57 - test "z$(cat .git/PRE-REBASE-INPUT)" = zmaster,
57 + test "z$(cat .git/PRE-REBASE-INPUT)" = zmain,
58
59 '
60
61 test_expect_success 'pre-rebase hook gets correct input (2)' '
62 git checkout test &&
63 git reset --hard side &&
64 - git rebase master test &&
64 + git rebase main test &&
65 test "z$(cat git)" = zworld &&
66 - test "z$(cat .git/PRE-REBASE-INPUT)" = zmaster,test
66 + test "z$(cat .git/PRE-REBASE-INPUT)" = zmain,test
67 '
68
69 test_expect_success 'pre-rebase hook gets correct input (3)' '
70 git checkout test &&
71 git reset --hard side &&
72 - git checkout master &&
73 - git rebase master test &&
72 + git checkout main &&
73 + git rebase main test &&
74 test "z$(cat git)" = zworld &&
75 - test "z$(cat .git/PRE-REBASE-INPUT)" = zmaster,test
75 + test "z$(cat .git/PRE-REBASE-INPUT)" = zmain,test
76 '
77
78 test_expect_success 'pre-rebase hook gets correct input (4)' '
79 git checkout test &&
80 git reset --hard side &&
81 - EDITOR=true git rebase -i master &&
81 + EDITOR=true git rebase -i main &&
82 test "z$(cat git)" = zworld &&
83 - test "z$(cat .git/PRE-REBASE-INPUT)" = zmaster,
83 + test "z$(cat .git/PRE-REBASE-INPUT)" = zmain,
84
85 '
86
87 test_expect_success 'pre-rebase hook gets correct input (5)' '
88 git checkout test &&
89 git reset --hard side &&
90 - EDITOR=true git rebase -i master test &&
90 + EDITOR=true git rebase -i main test &&
91 test "z$(cat git)" = zworld &&
92 - test "z$(cat .git/PRE-REBASE-INPUT)" = zmaster,test
92 + test "z$(cat .git/PRE-REBASE-INPUT)" = zmain,test
93 '
94
95 test_expect_success 'pre-rebase hook gets correct input (6)' '
96 git checkout test &&
97 git reset --hard side &&
98 - git checkout master &&
99 - EDITOR=true git rebase -i master test &&
98 + git checkout main &&
99 + EDITOR=true git rebase -i main test &&
100 test "z$(cat git)" = zworld &&
101 - test "z$(cat .git/PRE-REBASE-INPUT)" = zmaster,test
101 + test "z$(cat .git/PRE-REBASE-INPUT)" = zmain,test
102 '
103
104 test_expect_success 'setup pre-rebase hook that fails' '
@@ -113,7 +113,7 @@ EOF
113 test_expect_success 'pre-rebase hook stops rebase (1)' '
114 git checkout test &&
115 git reset --hard side &&
116 - test_must_fail git rebase master &&
116 + test_must_fail git rebase main &&
117 test "z$(git symbolic-ref HEAD)" = zrefs/heads/test &&
118 test 0 = $(git rev-list HEAD...side | wc -l)
119 '
@@ -121,7 +121,7 @@ test_expect_success 'pre-rebase hook stops rebase (1)' '
121 test_expect_success 'pre-rebase hook stops rebase (2)' '
122 git checkout test &&
123 git reset --hard side &&
124 - test_must_fail env EDITOR=: git rebase -i master &&
124 + test_must_fail env EDITOR=: git rebase -i main &&
125 test "z$(git symbolic-ref HEAD)" = zrefs/heads/test &&
126 test 0 = $(git rev-list HEAD...side | wc -l)
127 '
@@ -129,7 +129,7 @@ test_expect_success 'pre-rebase hook stops rebase (2)' '
129 test_expect_success 'rebase --no-verify overrides pre-rebase (1)' '
130 git checkout test &&
131 git reset --hard side &&
132 - git rebase --no-verify master &&
132 + git rebase --no-verify main &&
133 test "z$(git symbolic-ref HEAD)" = zrefs/heads/test &&
134 test "z$(cat git)" = zworld
135 '
@@ -137,7 +137,7 @@ test_expect_success 'rebase --no-verify overrides pre-rebase (1)' '
137 test_expect_success 'rebase --no-verify overrides pre-rebase (2)' '
138 git checkout test &&
139 git reset --hard side &&
140 - EDITOR=true git rebase --no-verify -i master &&
140 + EDITOR=true git rebase --no-verify -i main &&
141 test "z$(git symbolic-ref HEAD)" = zrefs/heads/test &&
142 test "z$(cat git)" = zworld
143 '
t/t3415-rebase-autosquash.sh
+2 -2
@@ -2,7 +2,7 @@
2
3 test_description='auto squash'
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
@@ -410,7 +410,7 @@ test_expect_success 'wrapped original subject' '
410
411 test_expect_success 'abort last squash' '
412 test_when_finished "test_might_fail git rebase --abort" &&
413 - test_when_finished "git checkout master" &&
413 + test_when_finished "git checkout main" &&
414
415 git checkout -b some-squashes &&
416 git commit --allow-empty -m first &&
t/t3416-rebase-onto-threedots.sh
+28 -28
@@ -2,20 +2,20 @@
2
3 test_description='git rebase --onto A...B'
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 . "$TEST_DIRECTORY/lib-rebase.sh"
10
11 -# Rebase only the tip commit of "topic" on merge base between "master"
12 -# and "topic". Cannot do this for "side" with "master" because there
11 +# Rebase only the tip commit of "topic" on merge base between "main"
12 +# and "topic". Cannot do this for "side" with "main" because there
13 # is no single merge base.
14 #
15 #
16 # F---G topic G'
17 # / /
18 -# A---B---C---D---E master --> A---B---C---D---E
18 +# A---B---C---D---E main --> A---B---C---D---E
19 # \ \ /
20 # \ x
21 # \ / \
@@ -29,7 +29,7 @@ test_expect_success setup '
29 git branch topic &&
30 git checkout side &&
31 test_commit H &&
32 - git checkout master &&
32 + git checkout main &&
33 test_tick &&
34 git merge H &&
35 git tag D &&
@@ -45,83 +45,83 @@ test_expect_success setup '
45 test_commit K
46 '
47
48 -test_expect_success 'rebase --onto master...topic' '
48 +test_expect_success 'rebase --onto main...topic' '
49 git reset --hard &&
50 git checkout topic &&
51 git reset --hard G &&
52
53 - git rebase --onto master...topic F &&
53 + git rebase --onto main...topic F &&
54 git rev-parse HEAD^1 >actual &&
55 git rev-parse C^0 >expect &&
56 test_cmp expect actual
57 '
58
59 -test_expect_success 'rebase --onto master...' '
59 +test_expect_success 'rebase --onto main...' '
60 git reset --hard &&
61 git checkout topic &&
62 git reset --hard G &&
63
64 - git rebase --onto master... F &&
64 + git rebase --onto main... F &&
65 git rev-parse HEAD^1 >actual &&
66 git rev-parse C^0 >expect &&
67 test_cmp expect actual
68 '
69
70 -test_expect_success 'rebase --onto master...side' '
70 +test_expect_success 'rebase --onto main...side' '
71 git reset --hard &&
72 git checkout side &&
73 git reset --hard K &&
74
75 - test_must_fail git rebase --onto master...side J
75 + test_must_fail git rebase --onto main...side J
76 '
77
78 -test_expect_success 'rebase -i --onto master...topic' '
78 +test_expect_success 'rebase -i --onto main...topic' '
79 git reset --hard &&
80 git checkout topic &&
81 git reset --hard G &&
82 set_fake_editor &&
83 - EXPECT_COUNT=1 git rebase -i --onto master...topic F &&
83 + EXPECT_COUNT=1 git rebase -i --onto main...topic F &&
84 git rev-parse HEAD^1 >actual &&
85 git rev-parse C^0 >expect &&
86 test_cmp expect actual
87 '
88
89 -test_expect_success 'rebase -i --onto master...' '
89 +test_expect_success 'rebase -i --onto main...' '
90 git reset --hard &&
91 git checkout topic &&
92 git reset --hard G &&
93 set_fake_editor &&
94 - EXPECT_COUNT=1 git rebase -i --onto master... F &&
94 + EXPECT_COUNT=1 git rebase -i --onto main... F &&
95 git rev-parse HEAD^1 >actual &&
96 git rev-parse C^0 >expect &&
97 test_cmp expect actual
98 '
99
100 -test_expect_success 'rebase -i --onto master...side' '
100 +test_expect_success 'rebase -i --onto main...side' '
101 git reset --hard &&
102 git checkout side &&
103 git reset --hard K &&
104
105 set_fake_editor &&
106 - test_must_fail git rebase -i --onto master...side J
106 + test_must_fail git rebase -i --onto main...side J
107 '
108
109 test_expect_success 'rebase --keep-base --onto incompatible' '
110 - test_must_fail git rebase --keep-base --onto master...
110 + test_must_fail git rebase --keep-base --onto main...
111 '
112
113 test_expect_success 'rebase --keep-base --root incompatible' '
114 test_must_fail git rebase --keep-base --root
115 '
116
117 -test_expect_success 'rebase --keep-base master from topic' '
117 +test_expect_success 'rebase --keep-base main from topic' '
118 git reset --hard &&
119 git checkout topic &&
120 git reset --hard G &&
121
122 - git rebase --keep-base master &&
122 + git rebase --keep-base main &&
123 git rev-parse C >base.expect &&
124 - git merge-base master HEAD >base.actual &&
124 + git merge-base main HEAD >base.actual &&
125 test_cmp base.expect base.actual &&
126
127 git rev-parse HEAD~2 >actual &&
@@ -129,23 +129,23 @@ test_expect_success 'rebase --keep-base master from topic' '
129 test_cmp expect actual
130 '
131
132 -test_expect_success 'rebase --keep-base master from side' '
132 +test_expect_success 'rebase --keep-base main from side' '
133 git reset --hard &&
134 git checkout side &&
135 git reset --hard K &&
136
137 - test_must_fail git rebase --keep-base master
137 + test_must_fail git rebase --keep-base main
138 '
139
140 -test_expect_success 'rebase -i --keep-base master from topic' '
140 +test_expect_success 'rebase -i --keep-base main from topic' '
141 git reset --hard &&
142 git checkout topic &&
143 git reset --hard G &&
144
145 set_fake_editor &&
146 - EXPECT_COUNT=2 git rebase -i --keep-base master &&
146 + EXPECT_COUNT=2 git rebase -i --keep-base main &&
147 git rev-parse C >base.expect &&
148 - git merge-base master HEAD >base.actual &&
148 + git merge-base main HEAD >base.actual &&
149 test_cmp base.expect base.actual &&
150
151 git rev-parse HEAD~2 >actual &&
@@ -153,13 +153,13 @@ test_expect_success 'rebase -i --keep-base master from topic' '
153 test_cmp expect actual
154 '
155
156 -test_expect_success 'rebase -i --keep-base master from side' '
156 +test_expect_success 'rebase -i --keep-base main from side' '
157 git reset --hard &&
158 git checkout side &&
159 git reset --hard K &&
160
161 set_fake_editor &&
162 - test_must_fail git rebase -i --keep-base master
162 + test_must_fail git rebase -i --keep-base main
163 '
164
165 test_done
t/t3418-rebase-continue.sh
+13 -13
@@ -2,7 +2,7 @@
2
3 test_description='git rebase --continue tests'
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
@@ -18,13 +18,13 @@ test_expect_success 'setup' '
18 git checkout -b topic HEAD^ &&
19 test_commit "commit-new-file-F2-on-topic-branch" F2 22 &&
20
21 - git checkout master
21 + git checkout main
22 '
23
24 test_expect_success 'interactive rebase --continue works with touched file' '
25 rm -fr .git/rebase-* &&
26 git reset --hard &&
27 - git checkout master &&
27 + git checkout main &&
28
29 FAKE_LINES="edit 1" git rebase -i HEAD^ &&
30 test-tool chmtime =-60 F1 &&
@@ -34,9 +34,9 @@ test_expect_success 'interactive rebase --continue works with touched file' '
34 test_expect_success 'non-interactive rebase --continue works with touched file' '
35 rm -fr .git/rebase-* &&
36 git reset --hard &&
37 - git checkout master &&
37 + git checkout main &&
38
39 - test_must_fail git rebase --onto master master topic &&
39 + test_must_fail git rebase --onto main main topic &&
40 echo "Resolved" >F2 &&
41 git add F2 &&
42 test-tool chmtime =-60 F1 &&
@@ -64,7 +64,7 @@ test_expect_success 'rebase --continue remembers merge strategy and options' '
64 chmod +x test-bin/git-merge-funny &&
65 (
66 PATH=./test-bin:$PATH &&
67 - test_must_fail git rebase -s funny -Xopt master topic
67 + test_must_fail git rebase -s funny -Xopt main topic
68 ) &&
69 test -f funny.was.run &&
70 rm funny.was.run &&
@@ -96,7 +96,7 @@ test_expect_success 'rebase -i --continue handles merge strategy and options' '
96 chmod +x test-bin/git-merge-funny &&
97 (
98 PATH=./test-bin:$PATH &&
99 - test_must_fail git rebase -i -s funny -Xopt -Xfoo master topic
99 + test_must_fail git rebase -i -s funny -Xopt -Xfoo main topic
100 ) &&
101 test -f funny.was.run &&
102 rm funny.was.run &&
@@ -191,11 +191,11 @@ test_expect_success '--skip after failed fixup cleans commit message' '
191 test_expect_success 'setup rerere database' '
192 rm -fr .git/rebase-* &&
193 git reset --hard commit-new-file-F3-on-topic-branch &&
194 - git checkout master &&
194 + git checkout main &&
195 test_commit "commit-new-file-F3" F3 3 &&
196 test_config rerere.enabled true &&
197 git update-ref refs/heads/topic commit-new-file-F3-on-topic-branch &&
198 - test_must_fail git rebase -m master topic &&
198 + test_must_fail git rebase -m main topic &&
199 echo "Resolved" >F2 &&
200 cp F2 expected-F2 &&
201 git add F2 &&
@@ -210,7 +210,7 @@ test_expect_success 'setup rerere database' '
210 prepare () {
211 rm -fr .git/rebase-* &&
212 git reset --hard commit-new-file-F3-on-topic-branch &&
213 - git checkout master &&
213 + git checkout main &&
214 test_config rerere.enabled true
215 }
216
@@ -218,7 +218,7 @@ test_rerere_autoupdate () {
218 action=$1 &&
219 test_expect_success "rebase $action --continue remembers --rerere-autoupdate" '
220 prepare &&
221 - test_must_fail git rebase $action --rerere-autoupdate master topic &&
221 + test_must_fail git rebase $action --rerere-autoupdate main topic &&
222 test_cmp expected-F2 F2 &&
223 git diff-files --quiet &&
224 test_must_fail git rebase --continue &&
@@ -230,7 +230,7 @@ test_rerere_autoupdate () {
230 test_expect_success "rebase $action --continue honors rerere.autoUpdate" '
231 prepare &&
232 test_config rerere.autoupdate true &&
233 - test_must_fail git rebase $action master topic &&
233 + test_must_fail git rebase $action main topic &&
234 test_cmp expected-F2 F2 &&
235 git diff-files --quiet &&
236 test_must_fail git rebase --continue &&
@@ -242,7 +242,7 @@ test_rerere_autoupdate () {
242 test_expect_success "rebase $action --continue remembers --no-rerere-autoupdate" '
243 prepare &&
244 test_config rerere.autoupdate true &&
245 - test_must_fail git rebase $action --no-rerere-autoupdate master topic &&
245 + test_must_fail git rebase $action --no-rerere-autoupdate main topic &&
246 test_cmp expected-F2 F2 &&
247 test_must_fail git diff-files --quiet &&
248 git add F2 &&
t/t3419-rebase-patch-id.sh
+7 -7
@@ -2,7 +2,7 @@
2
3 test_description='git rebase - test patch id computation'
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
@@ -27,7 +27,7 @@ test_expect_success 'setup' '
27
28 test_expect_success 'setup: 500 lines' '
29 rm -f .gitattributes &&
30 - git checkout -q -f master &&
30 + git checkout -q -f main &&
31 git reset --hard root &&
32 test_seq 500 >file &&
33 git add file &&
@@ -43,7 +43,7 @@ test_expect_success 'setup: 500 lines' '
43 git add newfile &&
44 git commit -q -m "add small file" &&
45
46 - git cherry-pick master >/dev/null 2>&1
46 + git cherry-pick main >/dev/null 2>&1
47 '
48
49 test_expect_success 'setup attributes' '
@@ -51,18 +51,18 @@ test_expect_success 'setup attributes' '
51 '
52
53 test_expect_success 'detect upstream patch' '
54 - git checkout -q master &&
54 + git checkout -q main &&
55 scramble file &&
56 git add file &&
57 git commit -q -m "change big file again" &&
58 git checkout -q other^{} &&
59 - git rebase master &&
60 - git rev-list master...HEAD~ >revs &&
59 + git rebase main &&
60 + git rev-list main...HEAD~ >revs &&
61 test_must_be_empty revs
62 '
63
64 test_expect_success 'do not drop patch' '
65 - git branch -f squashed master &&
65 + git branch -f squashed main &&
66 git checkout -q -f squashed &&
67 git reset -q --soft HEAD~2 &&
68 git commit -q -m squashed &&
t/t3420-rebase-autostash.sh
+5 -5
@@ -4,7 +4,7 @@
4 #
5
6 test_description='git rebase --autostash tests'
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
@@ -24,12 +24,12 @@ test_expect_success setup '
24 git add . &&
25 test_tick &&
26 git commit -m "third commit" &&
27 - git checkout -b unrelated-onto-branch master &&
27 + git checkout -b unrelated-onto-branch main &&
28 echo unrelated >file4 &&
29 git add . &&
30 test_tick &&
31 git commit -m "unrelated commit" &&
32 - git checkout -b related-onto-branch master &&
32 + git checkout -b related-onto-branch main &&
33 echo conflicting-change >file2 &&
34 git add . &&
35 test_tick &&
@@ -308,7 +308,7 @@ test_expect_success 'autostash is saved on editor failure with conflict' '
308 '
309
310 test_expect_success 'autostash with dirty submodules' '
311 - test_when_finished "git reset --hard && git checkout master" &&
311 + test_when_finished "git reset --hard && git checkout main" &&
312 git checkout -b with-submodule &&
313 git submodule add ./ sub &&
314 test_tick &&
@@ -327,7 +327,7 @@ test_expect_success 'branch is left alone when possible' '
327
328 test_expect_success 'never change active branch' '
329 git checkout -b not-the-feature-branch unrelated-onto-branch &&
330 - test_when_finished "git reset --hard && git checkout master" &&
330 + test_when_finished "git reset --hard && git checkout main" &&
331 echo changed >file0 &&
332 git rebase --autostash not-the-feature-branch feature-branch &&
333 test_cmp_rev not-the-feature-branch unrelated-onto-branch
t/t3423-rebase-reword.sh
+3 -3
@@ -7,7 +7,7 @@ test_description='git rebase interactive with rewording'
7 . "$TEST_DIRECTORY"/lib-rebase.sh
8
9 test_expect_success 'setup' '
10 - test_commit master file-1 test &&
10 + test_commit main file-1 test &&
11
12 git checkout -b stuff &&
13
@@ -22,7 +22,7 @@ test_expect_success 'reword without issues functions as intended' '
22
23 set_fake_editor &&
24 FAKE_LINES="pick 1 reword 2" FAKE_COMMIT_MESSAGE="feature_b_reworded" \
25 - git rebase -i -v master &&
25 + git rebase -i -v main &&
26
27 test "$(git log -1 --format=%B)" = "feature_b_reworded" &&
28 test $(git rev-list --count HEAD) = 3
@@ -35,7 +35,7 @@ test_expect_success 'reword after a conflict preserves commit' '
35
36 set_fake_editor &&
37 test_must_fail env FAKE_LINES="reword 2" \
38 - git rebase -i -v master &&
38 + git rebase -i -v main &&
39
40 git checkout --theirs file-2 &&
41 git add file-2 &&
t/t3427-rebase-subtree.sh
+11 -11
@@ -4,7 +4,7 @@ test_description='git rebase tests for -Xsubtree
4
5 This test runs git rebase and tests the subtree strategy.
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
@@ -20,7 +20,7 @@ commit_message() {
20 #
21 # topic_1 - topic_2 - topic_3
22 # \
23 -# README ---------------------- Add subproject master - topic_4 - files_subtree/topic_5
23 +# README ---------------------- Add subproject main - topic_4 - files_subtree/topic_5
24 #
25 # Where the merge moves the files topic_[123].t into the subdirectory
26 # files_subtree/ and topic_4 as well as files_subtree/topic_5 add files to that
@@ -31,7 +31,7 @@ commit_message() {
31 # an empty commit is added on top. The pre-rebase commit history looks like
32 # this:
33 #
34 -# Add subproject master - topic_4 - files_subtree/topic_5 - Empty commit
34 +# Add subproject main - topic_4 - files_subtree/topic_5 - Empty commit
35 #
36 # where the root commit adds three files: topic_1.t, topic_2.t and topic_3.t.
37 #
@@ -51,11 +51,11 @@ test_expect_success 'setup' '
51 test_commit -C files topic_3 &&
52
53 : perform subtree merge into files_subtree/ &&
54 - git fetch files refs/heads/master:refs/heads/files-master &&
54 + git fetch files refs/heads/main:refs/heads/files-main &&
55 git merge -s ours --no-commit --allow-unrelated-histories \
56 - files-master &&
57 - git read-tree --prefix=files_subtree -u files-master &&
58 - git commit -m "Add subproject master" &&
56 + files-main &&
57 + git read-tree --prefix=files_subtree -u files-main &&
58 + git commit -m "Add subproject main" &&
59
60 : add two extra commits to rebase &&
61 test_commit -C files_subtree topic_4 &&
@@ -73,7 +73,7 @@ test_expect_success 'setup' '
73 test_expect_failure REBASE_P 'Rebase -Xsubtree --preserve-merges --onto commit' '
74 reset_rebase &&
75 git checkout -b rebase-preserve-merges to-rebase &&
76 - git rebase -Xsubtree=files_subtree --preserve-merges --onto files-master master &&
76 + git rebase -Xsubtree=files_subtree --preserve-merges --onto files-main main &&
77 verbose test "$(commit_message HEAD~)" = "topic_4" &&
78 verbose test "$(commit_message HEAD)" = "files_subtree/topic_5"
79 '
@@ -82,7 +82,7 @@ test_expect_failure REBASE_P 'Rebase -Xsubtree --preserve-merges --onto commit'
82 test_expect_failure REBASE_P 'Rebase -Xsubtree --keep-empty --preserve-merges --onto commit' '
83 reset_rebase &&
84 git checkout -b rebase-keep-empty to-rebase &&
85 - git rebase -Xsubtree=files_subtree --keep-empty --preserve-merges --onto files-master master &&
85 + git rebase -Xsubtree=files_subtree --keep-empty --preserve-merges --onto files-main main &&
86 verbose test "$(commit_message HEAD~2)" = "topic_4" &&
87 verbose test "$(commit_message HEAD~)" = "files_subtree/topic_5" &&
88 verbose test "$(commit_message HEAD)" = "Empty commit"
@@ -91,7 +91,7 @@ test_expect_failure REBASE_P 'Rebase -Xsubtree --keep-empty --preserve-merges --
91 test_expect_success 'Rebase -Xsubtree --empty=ask --onto commit' '
92 reset_rebase &&
93 git checkout -b rebase-onto to-rebase &&
94 - test_must_fail git rebase -Xsubtree=files_subtree --empty=ask --onto files-master master &&
94 + test_must_fail git rebase -Xsubtree=files_subtree --empty=ask --onto files-main main &&
95 : first pick results in no changes &&
96 git rebase --skip &&
97 verbose test "$(commit_message HEAD~2)" = "topic_4" &&
@@ -102,7 +102,7 @@ test_expect_success 'Rebase -Xsubtree --empty=ask --onto commit' '
102 test_expect_success 'Rebase -Xsubtree --empty=ask --rebase-merges --onto commit' '
103 reset_rebase &&
104 git checkout -b rebase-merges-onto to-rebase &&
105 - test_must_fail git rebase -Xsubtree=files_subtree --empty=ask --rebase-merges --onto files-master --root &&
105 + test_must_fail git rebase -Xsubtree=files_subtree --empty=ask --rebase-merges --onto files-main --root &&
106 : first pick results in no changes &&
107 git rebase --skip &&
108 verbose test "$(commit_message HEAD~2)" = "topic_4" &&
t/t3430-rebase-merges.sh
+9 -9
@@ -12,13 +12,13 @@ Initial setup:
12
13 -- B -- (first)
14 / \
15 - A - C - D - E - H (master)
15 + A - C - D - E - H (main)
16 \ \ /
17 \ F - G (second)
18 \
19 Conflicting-G
20 '
21 -GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=master
21 +GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main
22 export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME
23
24 . ./test-lib.sh
@@ -40,7 +40,7 @@ test_expect_success 'setup' '
40 git checkout -b first &&
41 test_commit B &&
42 b=$(git rev-parse --short HEAD) &&
43 - git checkout master &&
43 + git checkout main &&
44 test_commit C &&
45 c=$(git rev-parse --short HEAD) &&
46 test_commit D &&
@@ -55,7 +55,7 @@ test_expect_success 'setup' '
55 f=$(git rev-parse --short HEAD) &&
56 test_commit G &&
57 g=$(git rev-parse --short HEAD) &&
58 - git checkout master &&
58 + git checkout main &&
59 git merge --no-commit G &&
60 test_tick &&
61 git commit -m H &&
@@ -85,7 +85,7 @@ test_expect_success 'create completely different structure' '
85 EOF
86 test_config sequence.editor \""$PWD"/replace-editor.sh\" &&
87 test_tick &&
88 - git rebase -i -r A master &&
88 + git rebase -i -r A main &&
89 test_cmp_graph <<-\EOF
90 * Merge the topic branch '\''onebranch'\''
91 |\
@@ -186,7 +186,7 @@ test_expect_success 'fast-forward merge -c still rewords' '
186 '
187
188 test_expect_success 'with a branch tip that was cherry-picked already' '
189 - git checkout -b already-upstream master &&
189 + git checkout -b already-upstream main &&
190 base="$(git rev-parse --verify HEAD)" &&
191
192 test_commit A1 &&
@@ -214,7 +214,7 @@ test_expect_success 'with a branch tip that was cherry-picked already' '
214 '
215
216 test_expect_success 'do not rebase cousins unless asked for' '
217 - git checkout -b cousins master &&
217 + git checkout -b cousins main &&
218 before="$(git rev-parse --verify HEAD)" &&
219 test_tick &&
220 git rebase -r HEAD^ &&
@@ -343,7 +343,7 @@ test_expect_success 'a "merge" into a root commit is a fast-forward' '
343 test_expect_success 'A root commit can be a cousin, treat it that way' '
344 git checkout --orphan khnum &&
345 test_commit yama &&
346 - git checkout -b asherah master &&
346 + git checkout -b asherah main &&
347 test_commit shamkat &&
348 git merge --allow-unrelated-histories khnum &&
349 test_tick &&
@@ -370,7 +370,7 @@ test_expect_success 'labels that are object IDs are rewritten' '
370 git checkout -b third B &&
371 test_commit I &&
372 third=$(git rev-parse HEAD) &&
373 - git checkout -b labels master &&
373 + git checkout -b labels main &&
374 git merge --no-commit third &&
375 test_tick &&
376 git commit -m "Merge commit '\''$third'\'' into labels" &&
t/t3431-rebase-fork-point.sh
+17 -17
@@ -5,16 +5,16 @@
5
6 test_description='git rebase --fork-point test'
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
12
13 -# A---B---D---E (master)
13 +# A---B---D---E (main)
14 # \
15 # C*---F---G (side)
16 #
17 -# C was formerly part of master but master was rewound to remove C
17 +# C was formerly part of main but main was rewound to remove C
18 #
19 test_expect_success setup '
20 test_commit A &&
@@ -33,7 +33,7 @@ test_rebase () {
33 expected="$1" &&
34 shift &&
35 test_expect_success "git rebase $*" "
36 - git checkout master &&
36 + git checkout main &&
37 git reset --hard E &&
38 git checkout side &&
39 git reset --hard G &&
@@ -51,26 +51,26 @@ test_rebase 'G F C E D B A' --no-fork-point
51 test_rebase 'G F C D B A' --no-fork-point --onto D
52 test_rebase 'G F C B A' --no-fork-point --keep-base
53
54 -test_rebase 'G F E D B A' --fork-point refs/heads/master
55 -test_rebase 'G F E D B A' --fork-point master
54 +test_rebase 'G F E D B A' --fork-point refs/heads/main
55 +test_rebase 'G F E D B A' --fork-point main
56
57 -test_rebase 'G F D B A' --fork-point --onto D refs/heads/master
58 -test_rebase 'G F D B A' --fork-point --onto D master
57 +test_rebase 'G F D B A' --fork-point --onto D refs/heads/main
58 +test_rebase 'G F D B A' --fork-point --onto D main
59
60 -test_rebase 'G F B A' --fork-point --keep-base refs/heads/master
61 -test_rebase 'G F B A' --fork-point --keep-base master
60 +test_rebase 'G F B A' --fork-point --keep-base refs/heads/main
61 +test_rebase 'G F B A' --fork-point --keep-base main
62
63 -test_rebase 'G F C E D B A' refs/heads/master
64 -test_rebase 'G F C E D B A' master
63 +test_rebase 'G F C E D B A' refs/heads/main
64 +test_rebase 'G F C E D B A' main
65
66 -test_rebase 'G F C D B A' --onto D refs/heads/master
67 -test_rebase 'G F C D B A' --onto D master
66 +test_rebase 'G F C D B A' --onto D refs/heads/main
67 +test_rebase 'G F C D B A' --onto D main
68
69 -test_rebase 'G F C B A' --keep-base refs/heads/master
70 -test_rebase 'G F C B A' --keep-base master
69 +test_rebase 'G F C B A' --keep-base refs/heads/main
70 +test_rebase 'G F C B A' --keep-base main
71
72 test_expect_success 'git rebase --fork-point with ambigous refname' '
73 - git checkout master &&
73 + git checkout main &&
74 git checkout -b one &&
75 git checkout side &&
76 git tag one &&
t/t3432-rebase-fast-forward.sh
+18 -18
@@ -5,7 +5,7 @@
5
6 test_description='ensure rebase fast-forwards commits when possible'
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
@@ -87,19 +87,19 @@ test_rebase_same_head_ () {
87
88 changes='no changes'
89 test_rebase_same_head success noop same success work same
90 -test_rebase_same_head success noop same success work same master
90 +test_rebase_same_head success noop same success work same main
91 test_rebase_same_head success noop same success work diff --onto B B
92 test_rebase_same_head success noop same success work diff --onto B... B
93 -test_rebase_same_head success noop same success work same --onto master... master
94 -test_rebase_same_head success noop same success work same --keep-base master
93 +test_rebase_same_head success noop same success work same --onto main... main
94 +test_rebase_same_head success noop same success work same --keep-base main
95 test_rebase_same_head success noop same success work same --keep-base
96 test_rebase_same_head success noop same success work same --no-fork-point
97 test_rebase_same_head success noop same success work same --keep-base --no-fork-point
98 -test_rebase_same_head success noop same success work same --fork-point master
98 +test_rebase_same_head success noop same success work same --fork-point main
99 test_rebase_same_head success noop same success work diff --fork-point --onto B B
100 test_rebase_same_head success noop same success work diff --fork-point --onto B... B
101 -test_rebase_same_head success noop same success work same --fork-point --onto master... master
102 -test_rebase_same_head success noop same success work same --keep-base --keep-base master
101 +test_rebase_same_head success noop same success work same --fork-point --onto main... main
102 +test_rebase_same_head success noop same success work same --keep-base --keep-base main
103
104 test_expect_success 'add work same to side' '
105 test_commit E
@@ -107,22 +107,22 @@ test_expect_success 'add work same to side' '
107
108 changes='our changes'
109 test_rebase_same_head success noop same success work same
110 -test_rebase_same_head success noop same success work same master
110 +test_rebase_same_head success noop same success work same main
111 test_rebase_same_head success noop same success work diff --onto B B
112 test_rebase_same_head success noop same success work diff --onto B... B
113 -test_rebase_same_head success noop same success work same --onto master... master
114 -test_rebase_same_head success noop same success work same --keep-base master
113 +test_rebase_same_head success noop same success work same --onto main... main
114 +test_rebase_same_head success noop same success work same --keep-base main
115 test_rebase_same_head success noop same success work same --keep-base
116 test_rebase_same_head success noop same success work same --no-fork-point
117 test_rebase_same_head success noop same success work same --keep-base --no-fork-point
118 -test_rebase_same_head success noop same success work same --fork-point master
118 +test_rebase_same_head success noop same success work same --fork-point main
119 test_rebase_same_head success noop same success work diff --fork-point --onto B B
120 test_rebase_same_head success noop same success work diff --fork-point --onto B... B
121 -test_rebase_same_head success noop same success work same --fork-point --onto master... master
122 -test_rebase_same_head success noop same success work same --fork-point --keep-base master
121 +test_rebase_same_head success noop same success work same --fork-point --onto main... main
122 +test_rebase_same_head success noop same success work same --fork-point --keep-base main
123
124 test_expect_success 'add work same to upstream' '
125 - git checkout master &&
125 + git checkout main &&
126 test_commit F &&
127 git checkout side
128 '
@@ -130,12 +130,12 @@ test_expect_success 'add work same to upstream' '
130 changes='our and their changes'
131 test_rebase_same_head success noop same success work diff --onto B B
132 test_rebase_same_head success noop same success work diff --onto B... B
133 -test_rebase_same_head success noop same success work diff --onto master... master
134 -test_rebase_same_head success noop same success work diff --keep-base master
133 +test_rebase_same_head success noop same success work diff --onto main... main
134 +test_rebase_same_head success noop same success work diff --keep-base main
135 test_rebase_same_head success noop same success work diff --keep-base
136 test_rebase_same_head failure work same success work diff --fork-point --onto B B
137 test_rebase_same_head failure work same success work diff --fork-point --onto B... B
138 -test_rebase_same_head success noop same success work diff --fork-point --onto master... master
139 -test_rebase_same_head success noop same success work diff --fork-point --keep-base master
138 +test_rebase_same_head success noop same success work diff --fork-point --onto main... main
139 +test_rebase_same_head success noop same success work diff --fork-point --keep-base main
140
141 test_done
t/t3434-rebase-i18n.sh
+5 -5
@@ -7,14 +7,14 @@ test_description='rebase with changing encoding
7
8 Initial setup:
9
10 -1 - 2 master
10 +1 - 2 main
11 \
12 3 - 4 first
13 \
14 5 - 6 second
15 '
16
17 -GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=master
17 +GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main
18 export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME
19
20 . ./test-lib.sh
@@ -44,7 +44,7 @@ test_expect_success 'rebase --rebase-merges update encoding eucJP to UTF-8' '
44 git config i18n.commitencoding eucJP &&
45 git merge -F "$TEST_DIRECTORY/t3434/eucJP.txt" second &&
46 git config i18n.commitencoding UTF-8 &&
47 - git rebase --rebase-merges master &&
47 + git rebase --rebase-merges main &&
48 compare_msg eucJP.txt eucJP UTF-8
49 '
50
@@ -53,7 +53,7 @@ test_expect_success 'rebase --rebase-merges update encoding eucJP to ISO-2022-JP
53 git config i18n.commitencoding eucJP &&
54 git merge -F "$TEST_DIRECTORY/t3434/eucJP.txt" second &&
55 git config i18n.commitencoding ISO-2022-JP &&
56 - git rebase --rebase-merges master &&
56 + git rebase --rebase-merges main &&
57 compare_msg eucJP.txt eucJP ISO-2022-JP
58 '
59
@@ -69,7 +69,7 @@ test_rebase_continue_update_encode () {
69 git config i18n.commitencoding $old &&
70 git commit -F "$TEST_DIRECTORY/t3434/$msgfile" &&
71 git config i18n.commitencoding $new &&
72 - test_must_fail git rebase -m master &&
72 + test_must_fail git rebase -m main &&
73 test -f .git/rebase-merge/message &&
74 git stripspace <.git/rebase-merge/message >two.t &&
75 git add two.t &&
t/t3435-rebase-gpg-sign.sh
+3 -3
@@ -5,7 +5,7 @@
5
6 test_description='test rebase --[no-]gpg-sign'
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
@@ -49,7 +49,7 @@ test_expect_success 'setup: merge commit' '
49 test_commit fork-point &&
50 git switch -c side &&
51 test_commit three &&
52 - git switch master &&
52 + git switch main &&
53 git merge --no-ff side &&
54 git tag merged
55 '
@@ -67,7 +67,7 @@ test_rebase_gpg_sign false -i --no-gpg-sign --gpg-sign
67 test_expect_failure 'rebase -p --no-gpg-sign override commit.gpgsign' '
68 git reset --hard merged &&
69 git config commit.gpgsign true &&
70 - git rebase -p --no-gpg-sign --onto=one fork-point master &&
70 + git rebase -p --no-gpg-sign --onto=one fork-point main &&
71 test_must_fail git verify-commit HEAD
72 '
73
t/t3436-rebase-more-options.sh
+1 -1
@@ -28,7 +28,7 @@ test_expect_success 'setup' '
28 test_commit commit2 foo foo2 &&
29 test_commit commit3 foo foo3 &&
30
31 - git checkout --orphan master &&
31 + git checkout --orphan main &&
32 rm foo &&
33 test_write_lines "line 1" " line 2" "line 3" >file &&
34 git commit -am "add file" &&