tests: prepare aligned mentions of the default branch name

In some tests, the default branch name is part of aligned output. As we want to change the default branch name to `main`, which is two characters shorter than the old default branch name, we will have to adjust those tests. Since we use the original default branch name until the entire test suite has been adjusted accordingly, the touched test cases need to be guarded by a prereq (that is so far disabled so that they are skipped for now). The test cases that depend on those test cases that are newly guarded by that prereq naturally have to be guarded, too. Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de> Signed-off-by: Junio C Hamano <gitster@pobox.com>

Johannes Schindelin committed Oct 23, 2020 at 14:00 UTC 66713e84e713066f4984efdd1444a7567c4d9bde
8 files changed +82 -82
t/t3200-branch.sh
+6 -6
@@ -321,11 +321,11 @@ test_expect_success 'git branch --list -v with --abbrev' '
321
322 '
323
324 -test_expect_success 'git branch --column' '
324 +test_expect_success PREPARE_FOR_MAIN_BRANCH 'git branch --column' '
325 COLUMNS=81 git branch --column=column >actual &&
326 cat >expect <<\EOF &&
327 - a/b/c bam foo l * master n o/p r
328 - abc bar j/k m/m mb o/o q topic
327 + a/b/c bam foo l * main n o/p r
328 + abc bar j/k m/m mb o/o q topic
329 EOF
330 test_cmp expect actual
331 '
@@ -358,15 +358,15 @@ EOF
358 test_cmp expect actual
359 '
360
361 -test_expect_success 'git branch with column.*' '
361 +test_expect_success PREPARE_FOR_MAIN_BRANCH 'git branch with column.*' '
362 git config column.ui column &&
363 git config column.branch "dense" &&
364 COLUMNS=80 git branch >actual &&
365 git config --unset column.branch &&
366 git config --unset column.ui &&
367 cat >expect <<\EOF &&
368 - a/b/c bam foo l * master n o/p r
369 - abc bar j/k m/m mb o/o q topic
368 + a/b/c bam foo l * main n o/p r
369 + abc bar j/k m/m mb o/o q topic
370 EOF
371 test_cmp expect actual
372 '
t/t3201-branch-contains.sh
+4 -4
@@ -242,7 +242,7 @@ test_expect_success 'branch --merged combined with --no-merged' '
242 # Here "topic" tracks "master" with one extra commit, and "zzz" points to the
243 # same tip as master The name "zzz" must come alphabetically after "topic"
244 # as we process them in that order.
245 -test_expect_success 'branch --merged with --verbose' '
245 +test_expect_success PREPARE_FOR_MAIN_BRANCH 'branch --merged with --verbose' '
246 git branch --track topic master &&
247 git branch zzz topic &&
248 git checkout topic &&
@@ -256,9 +256,9 @@ test_expect_success 'branch --merged with --verbose' '
256 test_cmp expect actual &&
257 git branch --verbose --merged topic >actual &&
258 cat >expect <<-EOF &&
259 - master $(git rev-parse --short master) second on master
260 - * topic $(git rev-parse --short topic ) [ahead 1] foo
261 - zzz $(git rev-parse --short zzz ) second on master
259 + main $(git rev-parse --short main) second on main
260 + * topic $(git rev-parse --short topic ) [ahead 1] foo
261 + zzz $(git rev-parse --short zzz ) second on main
262 EOF
263 test_i18ncmp expect actual
264 '
t/t3203-branch-output.sh
+2 -2
@@ -329,7 +329,7 @@ test_expect_success '--color overrides auto-color' '
329 test_cmp expect.color actual
330 '
331
332 -test_expect_success 'verbose output lists worktree path' '
332 +test_expect_success PREPARE_FOR_MAIN_BRANCH 'verbose output lists worktree path' '
333 one=$(git rev-parse --short HEAD) &&
334 two=$(git rev-parse --short master) &&
335 cat >expect <<-EOF &&
@@ -337,7 +337,7 @@ test_expect_success 'verbose output lists worktree path' '
337 ambiguous $one one
338 branch-one $two two
339 + branch-two $one ($(pwd)/worktree_dir) one
340 - master $two two
340 + main $two two
341 ref-to-branch $two two
342 ref-to-remote $two two
343 EOF
t/t3205-branch-color.sh
+4 -4
@@ -28,12 +28,12 @@ test_expect_success 'regular output shows colors' '
28 test_cmp expect actual
29 '
30
31 -test_expect_success 'verbose output shows colors' '
31 +test_expect_success PREPARE_FOR_MAIN_BRANCH 'verbose output shows colors' '
32 oid=$(git rev-parse --short HEAD) &&
33 cat >expect <<-EOF &&
34 - * <CYAN>master <RESET> $oid foo
35 - <BLUE>other <RESET> $oid foo
36 - <YELLOW>remotes/origin/master<RESET> $oid foo
34 + * <CYAN>main <RESET> $oid foo
35 + <BLUE>other <RESET> $oid foo
36 + <YELLOW>remotes/origin/main<RESET> $oid foo
37 EOF
38 git branch --color -v -a >actual.raw &&
39 test_decode_color <actual.raw >actual &&
t/t5505-remote.sh
+15 -15
@@ -200,28 +200,28 @@ cat >test/expect <<EOF
200 Push URL: $(pwd)/one
201 HEAD branch: master
202 Remote branches:
203 - master new (next fetch will store in remotes/origin)
204 - side tracked
203 + main new (next fetch will store in remotes/origin)
204 + side tracked
205 Local branches configured for 'git pull':
206 - ahead merges with remote master
207 - master merges with remote master
206 + ahead merges with remote main
207 + main merges with remote main
208 octopus merges with remote topic-a
209 and with remote topic-b
210 and with remote topic-c
211 rebase rebases onto remote master
212 Local refs configured for 'git push':
213 - master pushes to master (local out of date)
214 - master pushes to upstream (create)
213 + main pushes to main (local out of date)
214 + main pushes to upstream (create)
215 * remote two
216 Fetch URL: ../two
217 Push URL: ../three
218 HEAD branch: master
219 Local refs configured for 'git push':
220 - ahead forces to master (fast-forwardable)
221 - master pushes to another (up to date)
220 + ahead forces to main (fast-forwardable)
221 + main pushes to another (up to date)
222 EOF
223
224 -test_expect_success 'show' '
224 +test_expect_success PREPARE_FOR_MAIN_BRANCH 'show' '
225 (
226 cd test &&
227 git config --add remote.origin.fetch refs/heads/master:refs/heads/upstream &&
@@ -264,15 +264,15 @@ cat >test/expect <<EOF
264 master
265 side
266 Local branches configured for 'git pull':
267 - ahead merges with remote master
268 - master merges with remote master
267 + ahead merges with remote main
268 + main merges with remote main
269 Local refs configured for 'git push' (status not queried):
270 (matching) pushes to (matching)
271 - refs/heads/master pushes to refs/heads/upstream
271 + refs/heads/main pushes to refs/heads/upstream
272 refs/tags/lastbackup forces to refs/tags/lastbackup
273 EOF
274
275 -test_expect_success 'show -n' '
275 +test_expect_success PREPARE_FOR_MAIN_BRANCH 'show -n' '
276 mv one one.unreachable &&
277 (
278 cd test &&
@@ -315,7 +315,7 @@ test_expect_success 'set-head --auto' '
315 )
316 '
317
318 -test_expect_success 'set-head --auto has no problem w/multiple HEADs' '
318 +test_expect_success PREPARE_FOR_MAIN_BRANCH 'set-head --auto has no problem w/multiple HEADs' '
319 (
320 cd test &&
321 git fetch two "refs/heads/*:refs/remotes/two/*" &&
@@ -1335,7 +1335,7 @@ test_expect_success 'unqualified <dst> refspec DWIM and advice' '
1335 )
1336 '
1337
1338 -test_expect_success 'refs/remotes/* <src> refspec and unqualified <dst> DWIM and advice' '
1338 +test_expect_success PREPARE_FOR_MAIN_BRANCH 'refs/remotes/* <src> refspec and unqualified <dst> DWIM and advice' '
1339 (
1340 cd two &&
1341 git tag -a -m "Some tag" my-tag master &&
t/t5510-fetch.sh
+4 -4
@@ -942,7 +942,7 @@ test_expect_success 'fetching with auto-gc does not lock up' '
942 )
943 '
944
945 -test_expect_success C_LOCALE_OUTPUT 'fetch aligned output' '
945 +test_expect_success PREPARE_FOR_MAIN_BRANCH,C_LOCALE_OUTPUT 'fetch aligned output' '
946 git clone . full-output &&
947 test_commit looooooooooooong-tag &&
948 (
@@ -951,13 +951,13 @@ test_expect_success C_LOCALE_OUTPUT 'fetch aligned output' '
951 grep -e "->" actual | cut -c 22- >../actual
952 ) &&
953 cat >expect <<-\EOF &&
954 - master -> origin/master
954 + main -> origin/main
955 looooooooooooong-tag -> looooooooooooong-tag
956 EOF
957 test_cmp expect actual
958 '
959
960 -test_expect_success C_LOCALE_OUTPUT 'fetch compact output' '
960 +test_expect_success PREPARE_FOR_MAIN_BRANCH,C_LOCALE_OUTPUT 'fetch compact output' '
961 git clone . compact &&
962 test_commit extraaa &&
963 (
@@ -966,7 +966,7 @@ test_expect_success C_LOCALE_OUTPUT 'fetch compact output' '
966 grep -e "->" actual | cut -c 22- >../actual
967 ) &&
968 cat >expect <<-\EOF &&
969 - master -> origin/*
969 + main -> origin/*
970 extraaa -> *
971 EOF
972 test_cmp expect actual
t/t5526-fetch-submodules.sh
+35 -35
@@ -18,7 +18,7 @@ add_upstream_commit() {
18 head2=$(git rev-parse --short HEAD) &&
19 echo "Fetching submodule submodule" > ../expect.err &&
20 echo "From $pwd/submodule" >> ../expect.err &&
21 - echo " $head1..$head2 master -> origin/master" >> ../expect.err
21 + echo " $head1..$head2 main -> origin/main" >> ../expect.err
22 ) &&
23 (
24 cd deepsubmodule &&
@@ -30,7 +30,7 @@ add_upstream_commit() {
30 head2=$(git rev-parse --short HEAD) &&
31 echo "Fetching submodule submodule/subdir/deepsubmodule" >> ../expect.err
32 echo "From $pwd/deepsubmodule" >> ../expect.err &&
33 - echo " $head1..$head2 master -> origin/master" >> ../expect.err
33 + echo " $head1..$head2 main -> origin/main" >> ../expect.err
34 )
35 }
36
@@ -61,7 +61,7 @@ test_expect_success setup '
61 )
62 '
63
64 -test_expect_success "fetch --recurse-submodules recurses into submodules" '
64 +test_expect_success PREPARE_FOR_MAIN_BRANCH "fetch --recurse-submodules recurses into submodules" '
65 add_upstream_commit &&
66 (
67 cd downstream &&
@@ -71,7 +71,7 @@ test_expect_success "fetch --recurse-submodules recurses into submodules" '
71 test_i18ncmp expect.err actual.err
72 '
73
74 -test_expect_success "submodule.recurse option triggers recursive fetch" '
74 +test_expect_success PREPARE_FOR_MAIN_BRANCH "submodule.recurse option triggers recursive fetch" '
75 add_upstream_commit &&
76 (
77 cd downstream &&
@@ -81,7 +81,7 @@ test_expect_success "submodule.recurse option triggers recursive fetch" '
81 test_i18ncmp expect.err actual.err
82 '
83
84 -test_expect_success "fetch --recurse-submodules -j2 has the same output behaviour" '
84 +test_expect_success PREPARE_FOR_MAIN_BRANCH "fetch --recurse-submodules -j2 has the same output behaviour" '
85 add_upstream_commit &&
86 (
87 cd downstream &&
@@ -111,7 +111,7 @@ test_expect_success "fetch --no-recurse-submodules only fetches superproject" '
111 test_must_be_empty actual.err
112 '
113
114 -test_expect_success "using fetchRecurseSubmodules=true in .gitmodules recurses into submodules" '
114 +test_expect_success PREPARE_FOR_MAIN_BRANCH "using fetchRecurseSubmodules=true in .gitmodules recurses into submodules" '
115 (
116 cd downstream &&
117 git config -f .gitmodules submodule.submodule.fetchRecurseSubmodules true &&
@@ -141,7 +141,7 @@ test_expect_success "using fetchRecurseSubmodules=false in .git/config overrides
141 test_must_be_empty actual.err
142 '
143
144 -test_expect_success "--recurse-submodules overrides fetchRecurseSubmodules setting from .git/config" '
144 +test_expect_success PREPARE_FOR_MAIN_BRANCH "--recurse-submodules overrides fetchRecurseSubmodules setting from .git/config" '
145 (
146 cd downstream &&
147 git fetch --recurse-submodules >../actual.out 2>../actual.err &&
@@ -170,7 +170,7 @@ test_expect_success "--quiet propagates to parallel submodules" '
170 test_must_be_empty actual.err
171 '
172
173 -test_expect_success "--dry-run propagates to submodules" '
173 +test_expect_success PREPARE_FOR_MAIN_BRANCH "--dry-run propagates to submodules" '
174 add_upstream_commit &&
175 (
176 cd downstream &&
@@ -180,7 +180,7 @@ test_expect_success "--dry-run propagates to submodules" '
180 test_i18ncmp expect.err actual.err
181 '
182
183 -test_expect_success "Without --dry-run propagates to submodules" '
183 +test_expect_success PREPARE_FOR_MAIN_BRANCH "Without --dry-run propagates to submodules" '
184 (
185 cd downstream &&
186 git fetch --recurse-submodules >../actual.out 2>../actual.err
@@ -189,7 +189,7 @@ test_expect_success "Without --dry-run propagates to submodules" '
189 test_i18ncmp expect.err actual.err
190 '
191
192 -test_expect_success "recurseSubmodules=true propagates into submodules" '
192 +test_expect_success PREPARE_FOR_MAIN_BRANCH "recurseSubmodules=true propagates into submodules" '
193 add_upstream_commit &&
194 (
195 cd downstream &&
@@ -200,7 +200,7 @@ test_expect_success "recurseSubmodules=true propagates into submodules" '
200 test_i18ncmp expect.err actual.err
201 '
202
203 -test_expect_success "--recurse-submodules overrides config in submodule" '
203 +test_expect_success PREPARE_FOR_MAIN_BRANCH "--recurse-submodules overrides config in submodule" '
204 add_upstream_commit &&
205 (
206 cd downstream &&
@@ -225,7 +225,7 @@ test_expect_success "--no-recurse-submodules overrides config setting" '
225 test_must_be_empty actual.err
226 '
227
228 -test_expect_success "Recursion doesn't happen when no new commits are fetched in the superproject" '
228 +test_expect_success PREPARE_FOR_MAIN_BRANCH "Recursion doesn't happen when no new commits are fetched in the superproject" '
229 (
230 cd downstream &&
231 (
@@ -239,13 +239,13 @@ test_expect_success "Recursion doesn't happen when no new commits are fetched in
239 test_must_be_empty actual.err
240 '
241
242 -test_expect_success "Recursion stops when no new submodule commits are fetched" '
242 +test_expect_success PREPARE_FOR_MAIN_BRANCH "Recursion stops when no new submodule commits are fetched" '
243 head1=$(git rev-parse --short HEAD) &&
244 git add submodule &&
245 git commit -m "new submodule" &&
246 head2=$(git rev-parse --short HEAD) &&
247 echo "From $pwd/." > expect.err.sub &&
248 - echo " $head1..$head2 master -> origin/master" >>expect.err.sub &&
248 + echo " $head1..$head2 main -> origin/main" >>expect.err.sub &&
249 head -3 expect.err >> expect.err.sub &&
250 (
251 cd downstream &&
@@ -255,7 +255,7 @@ test_expect_success "Recursion stops when no new submodule commits are fetched"
255 test_must_be_empty actual.out
256 '
257
258 -test_expect_success "Recursion doesn't happen when new superproject commits don't change any submodules" '
258 +test_expect_success PREPARE_FOR_MAIN_BRANCH "Recursion doesn't happen when new superproject commits don't change any submodules" '
259 add_upstream_commit &&
260 head1=$(git rev-parse --short HEAD) &&
261 echo a > file &&
@@ -263,7 +263,7 @@ test_expect_success "Recursion doesn't happen when new superproject commits don'
263 git commit -m "new file" &&
264 head2=$(git rev-parse --short HEAD) &&
265 echo "From $pwd/." > expect.err.file &&
266 - echo " $head1..$head2 master -> origin/master" >> expect.err.file &&
266 + echo " $head1..$head2 main -> origin/main" >> expect.err.file &&
267 (
268 cd downstream &&
269 git fetch >../actual.out 2>../actual.err
@@ -272,7 +272,7 @@ test_expect_success "Recursion doesn't happen when new superproject commits don'
272 test_i18ncmp expect.err.file actual.err
273 '
274
275 -test_expect_success "Recursion picks up config in submodule" '
275 +test_expect_success PREPARE_FOR_MAIN_BRANCH "Recursion picks up config in submodule" '
276 (
277 cd downstream &&
278 git fetch --recurse-submodules &&
@@ -287,7 +287,7 @@ test_expect_success "Recursion picks up config in submodule" '
287 git commit -m "new submodule" &&
288 head2=$(git rev-parse --short HEAD) &&
289 echo "From $pwd/." > expect.err.sub &&
290 - echo " $head1..$head2 master -> origin/master" >> expect.err.sub &&
290 + echo " $head1..$head2 main -> origin/main" >> expect.err.sub &&
291 cat expect.err >> expect.err.sub &&
292 (
293 cd downstream &&
@@ -301,7 +301,7 @@ test_expect_success "Recursion picks up config in submodule" '
301 test_must_be_empty actual.out
302 '
303
304 -test_expect_success "Recursion picks up all submodules when necessary" '
304 +test_expect_success PREPARE_FOR_MAIN_BRANCH "Recursion picks up all submodules when necessary" '
305 add_upstream_commit &&
306 (
307 cd submodule &&
@@ -316,14 +316,14 @@ test_expect_success "Recursion picks up all submodules when necessary" '
316 head2=$(git rev-parse --short HEAD) &&
317 echo "Fetching submodule submodule" > ../expect.err.sub &&
318 echo "From $pwd/submodule" >> ../expect.err.sub &&
319 - echo " $head1..$head2 master -> origin/master" >> ../expect.err.sub
319 + echo " $head1..$head2 main -> origin/main" >> ../expect.err.sub
320 ) &&
321 head1=$(git rev-parse --short HEAD) &&
322 git add submodule &&
323 git commit -m "new submodule" &&
324 head2=$(git rev-parse --short HEAD) &&
325 echo "From $pwd/." > expect.err.2 &&
326 - echo " $head1..$head2 master -> origin/master" >> expect.err.2 &&
326 + echo " $head1..$head2 main -> origin/main" >> expect.err.2 &&
327 cat expect.err.sub >> expect.err.2 &&
328 tail -3 expect.err >> expect.err.2 &&
329 (
@@ -334,7 +334,7 @@ test_expect_success "Recursion picks up all submodules when necessary" '
334 test_must_be_empty actual.out
335 '
336
337 -test_expect_success "'--recurse-submodules=on-demand' doesn't recurse when no new commits are fetched in the superproject (and ignores config)" '
337 +test_expect_success PREPARE_FOR_MAIN_BRANCH "'--recurse-submodules=on-demand' doesn't recurse when no new commits are fetched in the superproject (and ignores config)" '
338 add_upstream_commit &&
339 (
340 cd submodule &&
@@ -349,7 +349,7 @@ test_expect_success "'--recurse-submodules=on-demand' doesn't recurse when no ne
349 head2=$(git rev-parse --short HEAD) &&
350 echo Fetching submodule submodule > ../expect.err.sub &&
351 echo "From $pwd/submodule" >> ../expect.err.sub &&
352 - echo " $head1..$head2 master -> origin/master" >> ../expect.err.sub
352 + echo " $head1..$head2 main -> origin/main" >> ../expect.err.sub
353 ) &&
354 (
355 cd downstream &&
@@ -361,14 +361,14 @@ test_expect_success "'--recurse-submodules=on-demand' doesn't recurse when no ne
361 test_must_be_empty actual.err
362 '
363
364 -test_expect_success "'--recurse-submodules=on-demand' recurses as deep as necessary (and ignores config)" '
364 +test_expect_success PREPARE_FOR_MAIN_BRANCH "'--recurse-submodules=on-demand' recurses as deep as necessary (and ignores config)" '
365 head1=$(git rev-parse --short HEAD) &&
366 git add submodule &&
367 git commit -m "new submodule" &&
368 head2=$(git rev-parse --short HEAD) &&
369 tail -3 expect.err > expect.err.deepsub &&
370 echo "From $pwd/." > expect.err &&
371 - echo " $head1..$head2 master -> origin/master" >>expect.err &&
371 + echo " $head1..$head2 main -> origin/main" >>expect.err &&
372 cat expect.err.sub >> expect.err &&
373 cat expect.err.deepsub >> expect.err &&
374 (
@@ -389,7 +389,7 @@ test_expect_success "'--recurse-submodules=on-demand' recurses as deep as necess
389 test_i18ncmp expect.err actual.err
390 '
391
392 -test_expect_success "'--recurse-submodules=on-demand' stops when no new submodule commits are found in the superproject (and ignores config)" '
392 +test_expect_success PREPARE_FOR_MAIN_BRANCH "'--recurse-submodules=on-demand' stops when no new submodule commits are found in the superproject (and ignores config)" '
393 add_upstream_commit &&
394 head1=$(git rev-parse --short HEAD) &&
395 echo a >> file &&
@@ -397,7 +397,7 @@ test_expect_success "'--recurse-submodules=on-demand' stops when no new submodul
397 git commit -m "new file" &&
398 head2=$(git rev-parse --short HEAD) &&
399 echo "From $pwd/." > expect.err.file &&
400 - echo " $head1..$head2 master -> origin/master" >> expect.err.file &&
400 + echo " $head1..$head2 main -> origin/main" >> expect.err.file &&
401 (
402 cd downstream &&
403 git fetch --recurse-submodules=on-demand >../actual.out 2>../actual.err
@@ -406,7 +406,7 @@ test_expect_success "'--recurse-submodules=on-demand' stops when no new submodul
406 test_i18ncmp expect.err.file actual.err
407 '
408
409 -test_expect_success "'fetch.recurseSubmodules=on-demand' overrides global config" '
409 +test_expect_success PREPARE_FOR_MAIN_BRANCH "'fetch.recurseSubmodules=on-demand' overrides global config" '
410 (
411 cd downstream &&
412 git fetch --recurse-submodules
@@ -418,7 +418,7 @@ test_expect_success "'fetch.recurseSubmodules=on-demand' overrides global config
418 git commit -m "new submodule" &&
419 head2=$(git rev-parse --short HEAD) &&
420 echo "From $pwd/." > expect.err.2 &&
421 - echo " $head1..$head2 master -> origin/master" >>expect.err.2 &&
421 + echo " $head1..$head2 main -> origin/main" >>expect.err.2 &&
422 head -3 expect.err >> expect.err.2 &&
423 (
424 cd downstream &&
@@ -434,7 +434,7 @@ test_expect_success "'fetch.recurseSubmodules=on-demand' overrides global config
434 test_i18ncmp expect.err.2 actual.err
435 '
436
437 -test_expect_success "'submodule.<sub>.fetchRecurseSubmodules=on-demand' overrides fetch.recurseSubmodules" '
437 +test_expect_success PREPARE_FOR_MAIN_BRANCH "'submodule.<sub>.fetchRecurseSubmodules=on-demand' overrides fetch.recurseSubmodules" '
438 (
439 cd downstream &&
440 git fetch --recurse-submodules
@@ -446,7 +446,7 @@ test_expect_success "'submodule.<sub>.fetchRecurseSubmodules=on-demand' override
446 git commit -m "new submodule" &&
447 head2=$(git rev-parse --short HEAD) &&
448 echo "From $pwd/." > expect.err.2 &&
449 - echo " $head1..$head2 master -> origin/master" >>expect.err.2 &&
449 + echo " $head1..$head2 main -> origin/main" >>expect.err.2 &&
450 head -3 expect.err >> expect.err.2 &&
451 (
452 cd downstream &&
@@ -462,7 +462,7 @@ test_expect_success "'submodule.<sub>.fetchRecurseSubmodules=on-demand' override
462 test_i18ncmp expect.err.2 actual.err
463 '
464
465 -test_expect_success "don't fetch submodule when newly recorded commits are already present" '
465 +test_expect_success PREPARE_FOR_MAIN_BRANCH "don't fetch submodule when newly recorded commits are already present" '
466 (
467 cd submodule &&
468 git checkout -q HEAD^^
@@ -472,7 +472,7 @@ test_expect_success "don't fetch submodule when newly recorded commits are alrea
472 git commit -m "submodule rewound" &&
473 head2=$(git rev-parse --short HEAD) &&
474 echo "From $pwd/." > expect.err &&
475 - echo " $head1..$head2 master -> origin/master" >> expect.err &&
475 + echo " $head1..$head2 main -> origin/main" >> expect.err &&
476 (
477 cd downstream &&
478 git fetch >../actual.out 2>../actual.err
@@ -485,7 +485,7 @@ test_expect_success "don't fetch submodule when newly recorded commits are alrea
485 )
486 '
487
488 -test_expect_success "'fetch.recurseSubmodules=on-demand' works also without .gitmodules entry" '
488 +test_expect_success PREPARE_FOR_MAIN_BRANCH "'fetch.recurseSubmodules=on-demand' works also without .gitmodules entry" '
489 (
490 cd downstream &&
491 git fetch --recurse-submodules
@@ -497,7 +497,7 @@ test_expect_success "'fetch.recurseSubmodules=on-demand' works also without .git
497 git commit -m "new submodule without .gitmodules" &&
498 head2=$(git rev-parse --short HEAD) &&
499 echo "From $pwd/." >expect.err.2 &&
500 - echo " $head1..$head2 master -> origin/master" >>expect.err.2 &&
500 + echo " $head1..$head2 main -> origin/main" >>expect.err.2 &&
501 head -3 expect.err >>expect.err.2 &&
502 (
503 cd downstream &&
t/t6302-for-each-ref-filter.sh
+12 -12
@@ -113,9 +113,9 @@ test_expect_success '%(color) must fail' '
113 test_must_fail git for-each-ref --format="%(color)%(refname)"
114 '
115
116 -test_expect_success 'left alignment is default' '
116 +test_expect_success PREPARE_FOR_MAIN_BRANCH 'left alignment is default' '
117 cat >expect <<-\EOF &&
118 - refname is refs/heads/master |refs/heads/master
118 + refname is refs/heads/main |refs/heads/main
119 refname is refs/heads/side |refs/heads/side
120 refname is refs/odd/spot |refs/odd/spot
121 refname is refs/tags/annotated-tag|refs/tags/annotated-tag
@@ -131,9 +131,9 @@ test_expect_success 'left alignment is default' '
131 test_cmp expect actual
132 '
133
134 -test_expect_success 'middle alignment' '
134 +test_expect_success PREPARE_FOR_MAIN_BRANCH 'middle alignment' '
135 cat >expect <<-\EOF &&
136 - | refname is refs/heads/master |refs/heads/master
136 + | refname is refs/heads/main |refs/heads/main
137 | refname is refs/heads/side |refs/heads/side
138 | refname is refs/odd/spot |refs/odd/spot
139 |refname is refs/tags/annotated-tag|refs/tags/annotated-tag
@@ -149,9 +149,9 @@ test_expect_success 'middle alignment' '
149 test_cmp expect actual
150 '
151
152 -test_expect_success 'right alignment' '
152 +test_expect_success PREPARE_FOR_MAIN_BRANCH 'right alignment' '
153 cat >expect <<-\EOF &&
154 - | refname is refs/heads/master|refs/heads/master
154 + | refname is refs/heads/main|refs/heads/main
155 | refname is refs/heads/side|refs/heads/side
156 | refname is refs/odd/spot|refs/odd/spot
157 |refname is refs/tags/annotated-tag|refs/tags/annotated-tag
@@ -168,7 +168,7 @@ test_expect_success 'right alignment' '
168 '
169
170 cat >expect <<-\EOF
171 -| refname is refs/heads/master |refs/heads/master
171 +| refname is refs/heads/main |refs/heads/main
172 | refname is refs/heads/side |refs/heads/side
173 | refname is refs/odd/spot |refs/odd/spot
174 | refname is refs/tags/annotated-tag |refs/tags/annotated-tag
@@ -184,7 +184,7 @@ EOF
184 test_align_permutations() {
185 while read -r option
186 do
187 - test_expect_success "align:$option" '
187 + test_expect_success PREPARE_FOR_MAIN_BRANCH "align:$option" '
188 git for-each-ref --format="|%(align:$option)refname is %(refname)%(end)|%(refname)" >actual &&
189 test_cmp expect actual
190 '
@@ -213,9 +213,9 @@ EOF
213
214 # Individual atoms inside %(align:...) and %(end) must not be quoted.
215
216 -test_expect_success 'alignment with format quote' "
216 +test_expect_success PREPARE_FOR_MAIN_BRANCH 'alignment with format quote' "
217 cat >expect <<-\EOF &&
218 - |' '\''master| A U Thor'\'' '|
218 + |' '\''main| A U Thor'\'' '|
219 |' '\''side| A U Thor'\'' '|
220 |' '\''odd/spot| A U Thor'\'' '|
221 |' '\''annotated-tag| '\'' '|
@@ -231,9 +231,9 @@ test_expect_success 'alignment with format quote' "
231 test_cmp expect actual
232 "
233
234 -test_expect_success 'nested alignment with quote formatting' "
234 +test_expect_success PREPARE_FOR_MAIN_BRANCH 'nested alignment with quote formatting' "
235 cat >expect <<-\EOF &&
236 - |' master '|
236 + |' main '|
237 |' side '|
238 |' odd/spot '|
239 |' annotated-tag '|