]> git.ipfire.org Git - thirdparty/git.git/blobdiff - t/t9801-git-p4-branch.sh
Merge branch 'es/maintenance-of-bare-repositories'
[thirdparty/git.git] / t / t9801-git-p4-branch.sh
index a3abd778f93164ed35d169d8cbb37d9ab82b628a..56e64697a804932b1e1dcdfaa9a95239f4fd6fa9 100755 (executable)
@@ -2,6 +2,9 @@
 
 test_description='git p4 tests for p4 branches'
 
+GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main
+export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME
+
 . ./lib-git-p4.sh
 
 test_expect_success 'start p4d' '
@@ -67,7 +70,7 @@ test_expect_success 'import main, no branch detection' '
        (
                cd "$git" &&
                git log --oneline --graph --decorate --all &&
-               git rev-list master -- >wc &&
+               git rev-list main -- >wc &&
                test_line_count = 4 wc
        )
 '
@@ -78,7 +81,7 @@ test_expect_success 'import branch1, no branch detection' '
        (
                cd "$git" &&
                git log --oneline --graph --decorate --all &&
-               git rev-list master -- >wc &&
+               git rev-list main -- >wc &&
                test_line_count = 2 wc
        )
 '
@@ -89,7 +92,7 @@ test_expect_success 'import branch2, no branch detection' '
        (
                cd "$git" &&
                git log --oneline --graph --decorate --all &&
-               git rev-list master -- >wc &&
+               git rev-list main -- >wc &&
                test_line_count = 2 wc
        )
 '
@@ -100,7 +103,7 @@ test_expect_success 'import depot, no branch detection' '
        (
                cd "$git" &&
                git log --oneline --graph --decorate --all &&
-               git rev-list master -- >wc &&
+               git rev-list main -- >wc &&
                test_line_count = 8 wc
        )
 '
@@ -114,7 +117,7 @@ test_expect_success 'import depot, branch detection' '
                git log --oneline --graph --decorate --all &&
 
                # 4 main commits
-               git rev-list master -- >wc &&
+               git rev-list main -- >wc &&
                test_line_count = 4 wc &&
 
                # 3 main, 1 integrate, 1 on branch2
@@ -137,7 +140,7 @@ test_expect_success 'import depot, branch detection, branchList branch definitio
                git log --oneline --graph --decorate --all &&
 
                # 4 main commits
-               git rev-list master -- >wc &&
+               git rev-list main -- >wc &&
                test_line_count = 4 wc &&
 
                # 3 main, 1 integrate, 1 on branch2
@@ -484,7 +487,7 @@ test_expect_success 'use-client-spec detect-branches files in top-level' '
        (
                cd "$git" &&
                git p4 sync --detect-branches --use-client-spec //depot/usecs@all &&
-               git checkout -b master p4/usecs/b1 &&
+               git checkout -b main p4/usecs/b1 &&
                test_path_is_file b1-file1 &&
                test_path_is_missing b2-file2 &&
                test_path_is_missing b1 &&
@@ -537,7 +540,7 @@ test_expect_success 'use-client-spec detect-branches skips files in branches' '
        (
                cd "$git" &&
                git p4 sync --detect-branches --use-client-spec //depot/usecs@all &&
-               git checkout -b master p4/usecs/b3 &&
+               git checkout -b main p4/usecs/b3 &&
                test_path_is_file b1-file1 &&
                test_path_is_file b3-file3_2 &&
                test_path_is_missing b3-file3_1