Skip to content

Commit 8b70966

Browse files
dschogitster
authored andcommitted
tests: drop prereq PREPARE_FOR_MAIN_BRANCH where no longer needed
We introduced the `PREPARE_FOR_MAIN_BRANCH` prereq for the sole purpose of allowing us to perform the non-trivial adjustments regarding the `master` -> `main` rename before the automatable ones. Now that the transition is almost complete, we can stop using it in most instances. The only two exceptions are t5526 and t9902: at the time of writing, there are other patches in flight that touch these test scripts, therefore their transition to `main` is postponed to a later date. This patch is the result of this command: sed -i 's/PREPARE_FOR_MAIN_BRANCH[ ,]//' t/t[0-9]*.sh && git checkout HEAD -- t/t5526\* t/t9902\* Signed-off-by: Johannes Schindelin <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent 8dcf73c commit 8b70966

9 files changed

+21
-21
lines changed

t/t1400-update-ref.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -588,7 +588,7 @@ test_expect_success 'stdin fails on unbalanced quotes' '
588588
grep "fatal: badly quoted argument: \\\"main" err
589589
'
590590

591-
test_expect_success PREPARE_FOR_MAIN_BRANCH 'stdin fails on invalid escape' '
591+
test_expect_success 'stdin fails on invalid escape' '
592592
echo "create $a \"ma\zn\"" >stdin &&
593593
test_must_fail git update-ref --stdin <stdin 2>err &&
594594
grep "fatal: badly quoted argument: \\\"ma\\\\zn\\\"" err
@@ -707,7 +707,7 @@ test_expect_success 'stdin succeeds with quoted argument' '
707707
test_cmp expect actual
708708
'
709709

710-
test_expect_success PREPARE_FOR_MAIN_BRANCH 'stdin succeeds with escaped character' '
710+
test_expect_success 'stdin succeeds with escaped character' '
711711
git update-ref -d $a &&
712712
echo "create $a \"ma\\151n\"" >stdin &&
713713
git update-ref --stdin <stdin &&

t/t3200-branch.sh

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -324,7 +324,7 @@ test_expect_success 'git branch --list -v with --abbrev' '
324324
325325
'
326326

327-
test_expect_success PREPARE_FOR_MAIN_BRANCH 'git branch --column' '
327+
test_expect_success 'git branch --column' '
328328
COLUMNS=81 git branch --column=column >actual &&
329329
cat >expect <<\EOF &&
330330
a/b/c bam foo l * main n o/p r
@@ -361,7 +361,7 @@ EOF
361361
test_cmp expect actual
362362
'
363363

364-
test_expect_success PREPARE_FOR_MAIN_BRANCH 'git branch with column.*' '
364+
test_expect_success 'git branch with column.*' '
365365
git config column.ui column &&
366366
git config column.branch "dense" &&
367367
COLUMNS=80 git branch >actual &&
@@ -378,7 +378,7 @@ test_expect_success 'git branch --column -v should fail' '
378378
test_must_fail git branch --column -v
379379
'
380380

381-
test_expect_success PREPARE_FOR_MAIN_BRANCH 'git branch -v with column.ui ignored' '
381+
test_expect_success 'git branch -v with column.ui ignored' '
382382
git config column.ui column &&
383383
COLUMNS=80 git branch -v | cut -c -8 | sed "s/ *$//" >actual &&
384384
git config --unset column.ui &&

t/t3201-branch-contains.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -245,7 +245,7 @@ test_expect_success 'branch --merged combined with --no-merged' '
245245
# Here "topic" tracks "main" with one extra commit, and "zzz" points to the
246246
# same tip as main The name "zzz" must come alphabetically after "topic"
247247
# as we process them in that order.
248-
test_expect_success PREPARE_FOR_MAIN_BRANCH 'branch --merged with --verbose' '
248+
test_expect_success 'branch --merged with --verbose' '
249249
git branch --track topic main &&
250250
git branch zzz topic &&
251251
git checkout topic &&

t/t3203-branch-output.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -332,7 +332,7 @@ test_expect_success '--color overrides auto-color' '
332332
test_cmp expect.color actual
333333
'
334334

335-
test_expect_success PREPARE_FOR_MAIN_BRANCH 'verbose output lists worktree path' '
335+
test_expect_success 'verbose output lists worktree path' '
336336
one=$(git rev-parse --short HEAD) &&
337337
two=$(git rev-parse --short main) &&
338338
cat >expect <<-EOF &&

t/t3205-branch-color.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ test_expect_success 'regular output shows colors' '
3131
test_cmp expect actual
3232
'
3333

34-
test_expect_success PREPARE_FOR_MAIN_BRANCH 'verbose output shows colors' '
34+
test_expect_success 'verbose output shows colors' '
3535
oid=$(git rev-parse --short HEAD) &&
3636
cat >expect <<-EOF &&
3737
* <CYAN>main <RESET> $oid foo

t/t5505-remote.sh

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -237,7 +237,7 @@ cat >test/expect <<EOF
237237
main pushes to another (up to date)
238238
EOF
239239

240-
test_expect_success PREPARE_FOR_MAIN_BRANCH 'show' '
240+
test_expect_success 'show' '
241241
(
242242
cd test &&
243243
git config --add remote.origin.fetch refs/heads/main:refs/heads/upstream &&
@@ -288,7 +288,7 @@ cat >test/expect <<EOF
288288
refs/tags/lastbackup forces to refs/tags/lastbackup
289289
EOF
290290

291-
test_expect_success PREPARE_FOR_MAIN_BRANCH 'show -n' '
291+
test_expect_success 'show -n' '
292292
mv one one.unreachable &&
293293
(
294294
cd test &&
@@ -331,7 +331,7 @@ test_expect_success 'set-head --auto' '
331331
)
332332
'
333333

334-
test_expect_success PREPARE_FOR_MAIN_BRANCH 'set-head --auto has no problem w/multiple HEADs' '
334+
test_expect_success 'set-head --auto has no problem w/multiple HEADs' '
335335
(
336336
cd test &&
337337
git fetch two "refs/heads/*:refs/remotes/two/*" &&
@@ -1351,7 +1351,7 @@ test_expect_success 'unqualified <dst> refspec DWIM and advice' '
13511351
)
13521352
'
13531353

1354-
test_expect_success PREPARE_FOR_MAIN_BRANCH 'refs/remotes/* <src> refspec and unqualified <dst> DWIM and advice' '
1354+
test_expect_success 'refs/remotes/* <src> refspec and unqualified <dst> DWIM and advice' '
13551355
(
13561356
cd two &&
13571357
git tag -a -m "Some tag" my-tag main &&

t/t5510-fetch.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -945,7 +945,7 @@ test_expect_success 'fetching with auto-gc does not lock up' '
945945
)
946946
'
947947

948-
test_expect_success PREPARE_FOR_MAIN_BRANCH,C_LOCALE_OUTPUT 'fetch aligned output' '
948+
test_expect_success C_LOCALE_OUTPUT 'fetch aligned output' '
949949
git clone . full-output &&
950950
test_commit looooooooooooong-tag &&
951951
(
@@ -960,7 +960,7 @@ test_expect_success PREPARE_FOR_MAIN_BRANCH,C_LOCALE_OUTPUT 'fetch aligned outpu
960960
test_cmp expect actual
961961
'
962962

963-
test_expect_success PREPARE_FOR_MAIN_BRANCH,C_LOCALE_OUTPUT 'fetch compact output' '
963+
test_expect_success C_LOCALE_OUTPUT 'fetch compact output' '
964964
git clone . compact &&
965965
test_commit extraaa &&
966966
(

t/t5703-upload-pack-ref-in-want.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -386,7 +386,7 @@ test_expect_success 'server is initially behind - ref in want' '
386386
test_cmp expected actual
387387
'
388388

389-
test_expect_success PREPARE_FOR_MAIN_BRANCH 'server loses a ref - ref in want' '
389+
test_expect_success 'server loses a ref - ref in want' '
390390
git -C "$REPO" config uploadpack.allowRefInWant true &&
391391
rm -rf local &&
392392
cp -r "$LOCAL_PRISTINE" local &&

t/t6302-for-each-ref-filter.sh

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -116,7 +116,7 @@ test_expect_success '%(color) must fail' '
116116
test_must_fail git for-each-ref --format="%(color)%(refname)"
117117
'
118118

119-
test_expect_success PREPARE_FOR_MAIN_BRANCH 'left alignment is default' '
119+
test_expect_success 'left alignment is default' '
120120
cat >expect <<-\EOF &&
121121
refname is refs/heads/main |refs/heads/main
122122
refname is refs/heads/side |refs/heads/side
@@ -134,7 +134,7 @@ test_expect_success PREPARE_FOR_MAIN_BRANCH 'left alignment is default' '
134134
test_cmp expect actual
135135
'
136136

137-
test_expect_success PREPARE_FOR_MAIN_BRANCH 'middle alignment' '
137+
test_expect_success 'middle alignment' '
138138
cat >expect <<-\EOF &&
139139
| refname is refs/heads/main |refs/heads/main
140140
| refname is refs/heads/side |refs/heads/side
@@ -152,7 +152,7 @@ test_expect_success PREPARE_FOR_MAIN_BRANCH 'middle alignment' '
152152
test_cmp expect actual
153153
'
154154

155-
test_expect_success PREPARE_FOR_MAIN_BRANCH 'right alignment' '
155+
test_expect_success 'right alignment' '
156156
cat >expect <<-\EOF &&
157157
| refname is refs/heads/main|refs/heads/main
158158
| refname is refs/heads/side|refs/heads/side
@@ -187,7 +187,7 @@ EOF
187187
test_align_permutations() {
188188
while read -r option
189189
do
190-
test_expect_success PREPARE_FOR_MAIN_BRANCH "align:$option" '
190+
test_expect_success "align:$option" '
191191
git for-each-ref --format="|%(align:$option)refname is %(refname)%(end)|%(refname)" >actual &&
192192
test_cmp expect actual
193193
'
@@ -216,7 +216,7 @@ EOF
216216

217217
# Individual atoms inside %(align:...) and %(end) must not be quoted.
218218

219-
test_expect_success PREPARE_FOR_MAIN_BRANCH 'alignment with format quote' "
219+
test_expect_success 'alignment with format quote' "
220220
cat >expect <<-\EOF &&
221221
|' '\''main| A U Thor'\'' '|
222222
|' '\''side| A U Thor'\'' '|
@@ -234,7 +234,7 @@ test_expect_success PREPARE_FOR_MAIN_BRANCH 'alignment with format quote' "
234234
test_cmp expect actual
235235
"
236236

237-
test_expect_success PREPARE_FOR_MAIN_BRANCH 'nested alignment with quote formatting' "
237+
test_expect_success 'nested alignment with quote formatting' "
238238
cat >expect <<-\EOF &&
239239
|' main '|
240240
|' side '|

0 commit comments

Comments
 (0)