summaryrefslogtreecommitdiff
path: root/t/t9801-git-p4-branch.sh
diff options
context:
space:
mode:
authorLibravatar Johannes Schindelin <johannes.schindelin@gmx.de>2020-11-18 23:44:44 +0000
committerLibravatar Junio C Hamano <gitster@pobox.com>2020-11-19 15:44:18 -0800
commit46a29020bb98bf086ef75036abf82ae8721e7466 (patch)
treec8ce328b245a44c60d3fceb93653ad79e98c2fb3 /t/t9801-git-p4-branch.sh
parentt9[5-7]*: adjust the references to the default branch name "main" (diff)
downloadtgif-46a29020bb98bf086ef75036abf82ae8721e7466.tar.xz
tests(git-p4): transition to the default branch name `main`
In the previous commits, we adjusted the test suite to use the branch name `main` for initial branches. The `git p4`-related tests are a bit harder to adjust because `git p4` uses the ref `refs/heads/p4/master` to track the remote branches, and for now, we do not want to change that (this might be the subject of a future patch series). We only need to adjust for the actual initial branch name to be changed to `main`. This allows us to define `GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main` for those tests. Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 't/t9801-git-p4-branch.sh')
-rwxr-xr-xt/t9801-git-p4-branch.sh18
1 files changed, 9 insertions, 9 deletions
diff --git a/t/t9801-git-p4-branch.sh b/t/t9801-git-p4-branch.sh
index ebfe9d8195..56e64697a8 100755
--- a/t/t9801-git-p4-branch.sh
+++ b/t/t9801-git-p4-branch.sh
@@ -2,7 +2,7 @@
test_description='git p4 tests for p4 branches'
-GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=master
+GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main
export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME
. ./lib-git-p4.sh
@@ -70,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
)
'
@@ -81,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
)
'
@@ -92,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
)
'
@@ -103,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
)
'
@@ -117,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
@@ -140,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
@@ -487,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 &&
@@ -540,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