]> git.ipfire.org Git - thirdparty/git.git/commitdiff
tests: drop prereq `PREPARE_FOR_MAIN_BRANCH` where no longer needed
authorJohannes Schindelin <johannes.schindelin@gmx.de>
Wed, 18 Nov 2020 23:44:46 +0000 (23:44 +0000)
committerJunio C Hamano <gitster@pobox.com>
Thu, 19 Nov 2020 23:44:18 +0000 (15:44 -0800)
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 <johannes.schindelin@gmx.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
t/t1400-update-ref.sh
t/t3200-branch.sh
t/t3201-branch-contains.sh
t/t3203-branch-output.sh
t/t3205-branch-color.sh
t/t5505-remote.sh
t/t5510-fetch.sh
t/t5703-upload-pack-ref-in-want.sh
t/t6302-for-each-ref-filter.sh

index 1ad0bbbc5305c757e3c5f042ee8632b465e11c48..e7cd4917d19e9d8673d9a4995f1a75a73eda86ac 100755 (executable)
@@ -588,7 +588,7 @@ test_expect_success 'stdin fails on unbalanced quotes' '
        grep "fatal: badly quoted argument: \\\"main" err
 '
 
-test_expect_success PREPARE_FOR_MAIN_BRANCH 'stdin fails on invalid escape' '
+test_expect_success 'stdin fails on invalid escape' '
        echo "create $a \"ma\zn\"" >stdin &&
        test_must_fail git update-ref --stdin <stdin 2>err &&
        grep "fatal: badly quoted argument: \\\"ma\\\\zn\\\"" err
@@ -707,7 +707,7 @@ test_expect_success 'stdin succeeds with quoted argument' '
        test_cmp expect actual
 '
 
-test_expect_success PREPARE_FOR_MAIN_BRANCH 'stdin succeeds with escaped character' '
+test_expect_success 'stdin succeeds with escaped character' '
        git update-ref -d $a &&
        echo "create $a \"ma\\151n\"" >stdin &&
        git update-ref --stdin <stdin &&
index 56517dd9c3837da50b64e1476ef09ae0ed6bc5e3..66eed73f83835da0c8aa3e0e8d3a7430e493f17f 100755 (executable)
@@ -324,7 +324,7 @@ test_expect_success 'git branch --list -v with --abbrev' '
 
 '
 
-test_expect_success PREPARE_FOR_MAIN_BRANCH 'git branch --column' '
+test_expect_success 'git branch --column' '
        COLUMNS=81 git branch --column=column >actual &&
        cat >expect <<\EOF &&
   a/b/c   bam     foo     l     * main    n       o/p     r
@@ -361,7 +361,7 @@ EOF
        test_cmp expect actual
 '
 
-test_expect_success PREPARE_FOR_MAIN_BRANCH 'git branch with column.*' '
+test_expect_success 'git branch with column.*' '
        git config column.ui column &&
        git config column.branch "dense" &&
        COLUMNS=80 git branch >actual &&
@@ -378,7 +378,7 @@ test_expect_success 'git branch --column -v should fail' '
        test_must_fail git branch --column -v
 '
 
-test_expect_success PREPARE_FOR_MAIN_BRANCH 'git branch -v with column.ui ignored' '
+test_expect_success 'git branch -v with column.ui ignored' '
        git config column.ui column &&
        COLUMNS=80 git branch -v | cut -c -8 | sed "s/ *$//" >actual &&
        git config --unset column.ui &&
index 8e626afbb994061126f1595a3267c161abc60445..f9f4d20e93c8cf5e7722338f741ad420080c0f19 100755 (executable)
@@ -245,7 +245,7 @@ test_expect_success 'branch --merged combined with --no-merged' '
 # Here "topic" tracks "main" with one extra commit, and "zzz" points to the
 # same tip as main The name "zzz" must come alphabetically after "topic"
 # as we process them in that order.
-test_expect_success PREPARE_FOR_MAIN_BRANCH 'branch --merged with --verbose' '
+test_expect_success 'branch --merged with --verbose' '
        git branch --track topic main &&
        git branch zzz topic &&
        git checkout topic &&
index a7d2edd988ea00db174b6c5c87c677f42d009f02..eaa37534aa8ce2e045d008f7f364a2cc91256e33 100755 (executable)
@@ -332,7 +332,7 @@ test_expect_success '--color overrides auto-color' '
        test_cmp expect.color actual
 '
 
-test_expect_success PREPARE_FOR_MAIN_BRANCH 'verbose output lists worktree path' '
+test_expect_success 'verbose output lists worktree path' '
        one=$(git rev-parse --short HEAD) &&
        two=$(git rev-parse --short main) &&
        cat >expect <<-EOF &&
index b905dc486733aa86e1e638e8a98bfb33ab35252c..2a09442c2b39b9e203bf1711974a7368d025f7cf 100755 (executable)
@@ -31,7 +31,7 @@ test_expect_success 'regular output shows colors' '
        test_cmp expect actual
 '
 
-test_expect_success PREPARE_FOR_MAIN_BRANCH 'verbose output shows colors' '
+test_expect_success 'verbose output shows colors' '
        oid=$(git rev-parse --short HEAD) &&
        cat >expect <<-EOF &&
        * <CYAN>main               <RESET> $oid foo
index f7e3c9b1e75072d55f9a64625fd4f7392a87d667..59fbb1fa7fb09e24f739658a528a26d856c367c4 100755 (executable)
@@ -237,7 +237,7 @@ cat >test/expect <<EOF
     main  pushes to another (up to date)
 EOF
 
-test_expect_success PREPARE_FOR_MAIN_BRANCH 'show' '
+test_expect_success 'show' '
        (
                cd test &&
                git config --add remote.origin.fetch refs/heads/main:refs/heads/upstream &&
@@ -288,7 +288,7 @@ cat >test/expect <<EOF
     refs/tags/lastbackup forces to refs/tags/lastbackup
 EOF
 
-test_expect_success PREPARE_FOR_MAIN_BRANCH 'show -n' '
+test_expect_success 'show -n' '
        mv one one.unreachable &&
        (
                cd test &&
@@ -331,7 +331,7 @@ test_expect_success 'set-head --auto' '
        )
 '
 
-test_expect_success PREPARE_FOR_MAIN_BRANCH 'set-head --auto has no problem w/multiple HEADs' '
+test_expect_success 'set-head --auto has no problem w/multiple HEADs' '
        (
                cd test &&
                git fetch two "refs/heads/*:refs/remotes/two/*" &&
@@ -1351,7 +1351,7 @@ test_expect_success 'unqualified <dst> refspec DWIM and advice' '
        )
 '
 
-test_expect_success PREPARE_FOR_MAIN_BRANCH 'refs/remotes/* <src> refspec and unqualified <dst> DWIM and advice' '
+test_expect_success 'refs/remotes/* <src> refspec and unqualified <dst> DWIM and advice' '
        (
                cd two &&
                git tag -a -m "Some tag" my-tag main &&
index 35d9a8c2797346889b860d05fa826194e4973ccf..d9ae7c20ce4c900a5d49f29b2f3e6d4f4a18966b 100755 (executable)
@@ -945,7 +945,7 @@ test_expect_success 'fetching with auto-gc does not lock up' '
        )
 '
 
-test_expect_success PREPARE_FOR_MAIN_BRANCH,C_LOCALE_OUTPUT 'fetch aligned output' '
+test_expect_success C_LOCALE_OUTPUT 'fetch aligned output' '
        git clone . full-output &&
        test_commit looooooooooooong-tag &&
        (
@@ -960,7 +960,7 @@ test_expect_success PREPARE_FOR_MAIN_BRANCH,C_LOCALE_OUTPUT 'fetch aligned outpu
        test_cmp expect actual
 '
 
-test_expect_success PREPARE_FOR_MAIN_BRANCH,C_LOCALE_OUTPUT 'fetch compact output' '
+test_expect_success C_LOCALE_OUTPUT 'fetch compact output' '
        git clone . compact &&
        test_commit extraaa &&
        (
index 0f3e0bf15c3f17e42f91518b69235f034273a0dd..2f4ce6b0faf360215ce63f168ef3c65987546388 100755 (executable)
@@ -386,7 +386,7 @@ test_expect_success 'server is initially behind - ref in want' '
        test_cmp expected actual
 '
 
-test_expect_success PREPARE_FOR_MAIN_BRANCH 'server loses a ref - ref in want' '
+test_expect_success 'server loses a ref - ref in want' '
        git -C "$REPO" config uploadpack.allowRefInWant true &&
        rm -rf local &&
        cp -r "$LOCAL_PRISTINE" local &&
index e5833af5286965834b31fd95fdc89240ef37211e..5d682cb31fa81c272c0cf44920be91367321cc75 100755 (executable)
@@ -116,7 +116,7 @@ test_expect_success '%(color) must fail' '
        test_must_fail git for-each-ref --format="%(color)%(refname)"
 '
 
-test_expect_success PREPARE_FOR_MAIN_BRANCH 'left alignment is default' '
+test_expect_success 'left alignment is default' '
        cat >expect <<-\EOF &&
        refname is refs/heads/main    |refs/heads/main
        refname is refs/heads/side    |refs/heads/side
@@ -134,7 +134,7 @@ test_expect_success PREPARE_FOR_MAIN_BRANCH 'left alignment is default' '
        test_cmp expect actual
 '
 
-test_expect_success PREPARE_FOR_MAIN_BRANCH 'middle alignment' '
+test_expect_success 'middle alignment' '
        cat >expect <<-\EOF &&
        |  refname is refs/heads/main  |refs/heads/main
        |  refname is refs/heads/side  |refs/heads/side
@@ -152,7 +152,7 @@ test_expect_success PREPARE_FOR_MAIN_BRANCH 'middle alignment' '
        test_cmp expect actual
 '
 
-test_expect_success PREPARE_FOR_MAIN_BRANCH 'right alignment' '
+test_expect_success 'right alignment' '
        cat >expect <<-\EOF &&
        |    refname is refs/heads/main|refs/heads/main
        |    refname is refs/heads/side|refs/heads/side
@@ -187,7 +187,7 @@ EOF
 test_align_permutations() {
        while read -r option
        do
-               test_expect_success PREPARE_FOR_MAIN_BRANCH "align:$option" '
+               test_expect_success "align:$option" '
                        git for-each-ref --format="|%(align:$option)refname is %(refname)%(end)|%(refname)" >actual &&
                        test_cmp expect actual
                '
@@ -216,7 +216,7 @@ EOF
 
 # Individual atoms inside %(align:...) and %(end) must not be quoted.
 
-test_expect_success PREPARE_FOR_MAIN_BRANCH 'alignment with format quote' "
+test_expect_success 'alignment with format quote' "
        cat >expect <<-\EOF &&
        |'       '\''main| A U Thor'\''       '|
        |'       '\''side| A U Thor'\''       '|
@@ -234,7 +234,7 @@ test_expect_success PREPARE_FOR_MAIN_BRANCH 'alignment with format quote' "
        test_cmp expect actual
 "
 
-test_expect_success PREPARE_FOR_MAIN_BRANCH 'nested alignment with quote formatting' "
+test_expect_success 'nested alignment with quote formatting' "
        cat >expect <<-\EOF &&
        |'           main               '|
        |'           side               '|