diff options
Diffstat (limited to 't/t5404-tracking-branches.sh')
-rwxr-xr-x | t/t5404-tracking-branches.sh | 15 |
1 files changed, 9 insertions, 6 deletions
diff --git a/t/t5404-tracking-branches.sh b/t/t5404-tracking-branches.sh index c24003565d..cc07889667 100755 --- a/t/t5404-tracking-branches.sh +++ b/t/t5404-tracking-branches.sh @@ -2,6 +2,9 @@ test_description='tracking branch update checks for git push' +GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main +export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME + . ./test-lib.sh test_expect_success 'setup' ' @@ -30,17 +33,17 @@ test_expect_success 'prepare pushable branches' ' git checkout -b b2 origin/b2 && echo aa-b2 >>file && git commit -a -m aa-b2 && - git checkout master && - echo aa-master >>file && - git commit -a -m aa-master + git checkout main && + echo aa-main >>file && + git commit -a -m aa-main ' test_expect_success 'mixed-success push returns error' ' - test_must_fail git push + test_must_fail git push origin : ' test_expect_success 'check tracking branches updated correctly after push' ' - test "$(git rev-parse origin/master)" = "$(git rev-parse master)" + test "$(git rev-parse origin/main)" = "$(git rev-parse main)" ' test_expect_success 'check tracking branches not updated for failed refs' ' @@ -56,7 +59,7 @@ test_expect_success 'deleted branches have their tracking branches removed' ' test_expect_success 'already deleted tracking branches ignored' ' git branch -d -r origin/b3 && git push origin :b3 >output 2>&1 && - ! grep error output + ! grep "^error: " output ' test_done |