]> git.ipfire.org Git - thirdparty/git.git/blobdiff - t/t3600-rm.sh
Merge branch 'zh/difftool-skip-to'
[thirdparty/git.git] / t / t3600-rm.sh
index 185e39c390ff7b36670d6c98d96b3a307ec659f3..bb9ef35dac082e396d5cbcbdc83bc5394fb95a7c 100755 (executable)
@@ -5,6 +5,9 @@
 
 test_description='Test of the various options to git rm.'
 
+GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main
+export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME
+
 . ./test-lib.sh
 
 # Setup some files to be removed, some with funny characters
@@ -451,7 +454,7 @@ test_expect_success 'rm issues a warning when section is not found in .gitmodule
        git add .gitmodules &&
        echo "warning: Could not find section in .gitmodules where path=submod" >expect.err &&
        git rm submod >actual 2>actual.err &&
-       test_i18ncmp expect.err actual.err &&
+       test_cmp expect.err actual.err &&
        test_path_is_missing submod &&
        test_path_is_missing submod/.git &&
        git status -s -uno >actual &&
@@ -495,16 +498,16 @@ test_expect_success 'setup submodule conflict' '
        echo 1 >nitfol &&
        git add nitfol &&
        git commit -m "added nitfol 1" &&
-       git checkout -b branch2 master &&
+       git checkout -b branch2 main &&
        echo 2 >nitfol &&
        git add nitfol &&
        git commit -m "added nitfol 2" &&
-       git checkout -b conflict1 master &&
+       git checkout -b conflict1 main &&
        git -C submod fetch &&
        git -C submod checkout branch1 &&
        git add submod &&
        git commit -m "submod 1" &&
-       git checkout -b conflict2 master &&
+       git checkout -b conflict2 main &&
        git -C submod checkout branch2 &&
        git add submod &&
        git commit -m "submod 2"
@@ -616,7 +619,7 @@ test_expect_success 'rm of a conflicted unpopulated submodule succeeds' '
 '
 
 test_expect_success 'rm of a populated submodule with a .git directory migrates git dir' '
-       git checkout -f master &&
+       git checkout -f main &&
        git reset --hard &&
        git submodule update &&
        (
@@ -729,7 +732,7 @@ test_expect_success 'checking out a commit after submodule removal needs manual
        git checkout HEAD^ &&
        git submodule update &&
        git checkout -q HEAD^ &&
-       git checkout -q master 2>actual &&
+       git checkout -q main 2>actual &&
        test_i18ngrep "^warning: unable to rmdir '\''submod'\'':" actual &&
        git status -s submod >actual &&
        echo "?? submod/" >expected &&
@@ -821,7 +824,7 @@ test_expect_success 'rm files with different staged content' '
        echo content1 >foo.txt &&
        echo content1 >bar.txt &&
        test_must_fail git rm foo.txt bar.txt 2>actual &&
-       test_i18ncmp expect actual
+       test_cmp expect actual
 '
 
 test_expect_success 'rm files with different staged content without hints' '
@@ -834,7 +837,7 @@ test_expect_success 'rm files with different staged content without hints' '
        echo content2 >foo.txt &&
        echo content2 >bar.txt &&
        test_must_fail git -c advice.rmhints=false rm foo.txt bar.txt 2>actual &&
-       test_i18ncmp expect actual
+       test_cmp expect actual
 '
 
 test_expect_success 'rm file with local modification' '
@@ -846,7 +849,7 @@ test_expect_success 'rm file with local modification' '
        git commit -m "testing rm 3" &&
        echo content3 >foo.txt &&
        test_must_fail git rm foo.txt 2>actual &&
-       test_i18ncmp expect actual
+       test_cmp expect actual
 '
 
 test_expect_success 'rm file with local modification without hints' '
@@ -856,7 +859,7 @@ test_expect_success 'rm file with local modification without hints' '
        EOF
        echo content4 >bar.txt &&
        test_must_fail git -c advice.rmhints=false rm bar.txt 2>actual &&
-       test_i18ncmp expect actual
+       test_cmp expect actual
 '
 
 test_expect_success 'rm file with changes in the index' '
@@ -869,7 +872,7 @@ test_expect_success 'rm file with changes in the index' '
        echo content5 >foo.txt &&
        git add foo.txt &&
        test_must_fail git rm foo.txt 2>actual &&
-       test_i18ncmp expect actual
+       test_cmp expect actual
 '
 
 test_expect_success 'rm file with changes in the index without hints' '
@@ -878,7 +881,7 @@ test_expect_success 'rm file with changes in the index without hints' '
            foo.txt
        EOF
        test_must_fail git -c advice.rmhints=false rm foo.txt 2>actual &&
-       test_i18ncmp expect actual
+       test_cmp expect actual
 '
 
 test_expect_success 'rm files with two different errors' '
@@ -897,7 +900,7 @@ test_expect_success 'rm files with two different errors' '
        echo content6 >bar1.txt &&
        git add bar1.txt &&
        test_must_fail git rm bar1.txt foo1.txt 2>actual &&
-       test_i18ncmp expect actual
+       test_cmp expect actual
 '
 
 test_expect_success 'rm empty string should fail' '