]> git.ipfire.org Git - thirdparty/git.git/commitdiff
tests: avoid using the branch name `main`
authorJohannes Schindelin <johannes.schindelin@gmx.de>
Thu, 8 Oct 2020 10:13:47 +0000 (10:13 +0000)
committerJunio C Hamano <gitster@pobox.com>
Thu, 8 Oct 2020 17:40:18 +0000 (10:40 -0700)
In the near future, we want to change Git's default branch name to
`main`. In preparation for that, stop using it as a branch name in the
test suite. Replace that branch name by `topic`, the same name we used
to rename variations of `master` in b6211b89eb3 (tests: avoid variations
of the `master` branch name, 2020-09-26).

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
t/t6012-rev-list-simplify.sh
t/t6400-merge-df.sh
t/t6409-merge-subtree.sh
t/t6430-merge-recursive.sh

index b6fa43ace0184f6504aeffd813964f5ac95a9fef..7fc10f85930c70e0527efc068dfb94658ca172c8 100755 (executable)
@@ -171,7 +171,7 @@ test_expect_success '--full-diff is not affected by --parents' '
 test_expect_success 'rebuild repo' '
        rm -rf .git * &&
        git init &&
-       git switch -c main &&
+       git switch -c topic &&
 
        echo base >file &&
        git add file &&
@@ -186,7 +186,7 @@ test_expect_success 'rebuild repo' '
        git add file &&
        test_commit B &&
 
-       git switch main &&
+       git switch topic &&
        test_must_fail git merge -m "M" B &&
        echo A >file &&
        echo B >>file &&
@@ -207,7 +207,7 @@ test_expect_success 'rebuild repo' '
        git merge -m R -Xtheirs X &&
        note R &&
 
-       git switch main &&
+       git switch topic &&
        git merge -m N R &&
        note N &&
 
@@ -221,7 +221,7 @@ test_expect_success 'rebuild repo' '
        git add z &&
        test_commit Z &&
 
-       git switch main &&
+       git switch topic &&
        git merge -m O Z &&
        note O &&
 
index 400a4cd13928121e1647c700b4abbdb368b47b49..f1b84617aff1b78e23b65a149e139cc3feea8577 100755 (executable)
@@ -124,7 +124,7 @@ test_expect_success 'Simple merge in repo with interesting pathnames' '
                git add . &&
                git commit -m initial &&
 
-               git branch main &&
+               git branch topic &&
                git branch other &&
 
                git checkout other &&
@@ -132,10 +132,10 @@ test_expect_success 'Simple merge in repo with interesting pathnames' '
                git add -u &&
                git commit -m other &&
 
-               git checkout main &&
-               echo main >foo/bar/baz &&
+               git checkout topic &&
+               echo topic >foo/bar/baz &&
                git add -u &&
-               git commit -m main &&
+               git commit -m topic &&
 
                git merge other &&
                git ls-files -s >out &&
index 1a0d0e23d028865656477343b3e550c3ed3f90ae..b8e8b6f6429e85aa456370637ca3e8c5f9e32cfc 100755 (executable)
@@ -35,11 +35,11 @@ test_expect_success 'setup branch sub' '
        test_commit foo
 '
 
-test_expect_success 'setup branch main' '
-       git checkout -b main master &&
+test_expect_success 'setup topic branch' '
+       git checkout -b topic master &&
        git merge -s ours --no-commit --allow-unrelated-histories sub &&
        git read-tree --prefix=dir/ -u sub &&
-       git commit -m "initial merge of sub into main" &&
+       git commit -m "initial merge of sub into topic" &&
        test_path_is_file dir/foo.t &&
        test_path_is_file hello
 '
@@ -49,9 +49,9 @@ test_expect_success 'update branch sub' '
        test_commit bar
 '
 
-test_expect_success 'update branch main' '
-       git checkout main &&
-       git merge -s subtree sub -m "second merge of sub into main" &&
+test_expect_success 'update topic branch' '
+       git checkout topic &&
+       git merge -s subtree sub -m "second merge of sub into topic" &&
        test_path_is_file dir/bar.t &&
        test_path_is_file dir/foo.t &&
        test_path_is_file hello
index d48d211a95403c4f995982a0a8bca2c1f1eaa17b..a328260d4264f84b32bbeab0ee70b620d597af3e 100755 (executable)
@@ -663,7 +663,7 @@ test_expect_failure 'merge-recursive rename vs. rename/symlink' '
 
 test_expect_success 'merging with triple rename across D/F conflict' '
        git reset --hard HEAD &&
-       git checkout -b main &&
+       git checkout -b topic &&
        git rm -rf . &&
 
        echo "just a file" >sub1 &&
@@ -682,7 +682,7 @@ test_expect_success 'merging with triple rename across D/F conflict' '
        test_tick &&
        git commit -a -m changesimplefile &&
 
-       git checkout main &&
+       git checkout topic &&
        git rm sub1 &&
        git mv sub2 sub1 &&
        test_tick &&