diff options
Diffstat (limited to 't/t5150-request-pull.sh')
-rwxr-xr-x | t/t5150-request-pull.sh | 37 |
1 files changed, 20 insertions, 17 deletions
diff --git a/t/t5150-request-pull.sh b/t/t5150-request-pull.sh index c1811ea0f4..db4e15fd59 100755 --- a/t/t5150-request-pull.sh +++ b/t/t5150-request-pull.sh @@ -2,6 +2,9 @@ test_description='Test workflows involving pull request.' +GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main +export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME + . ./test-lib.sh if ! test_have_prereq PERL @@ -31,13 +34,13 @@ test_expect_success 'setup' ' test_tick && git commit -m "\"Thirty days\", a reminder of month lengths" && git tag -m "version 1" -a initial && - git push --tags origin master + git push --tags origin main ) && ( cd local && git remote add upstream "$trash_url/upstream.git" && git fetch upstream && - git pull upstream master && + git pull upstream main && cat <<-\EOT >>mnemonic.txt && Of twyecescore-eightt is but eine, And all the remnante be thrycescore-eine. @@ -59,7 +62,7 @@ test_expect_success 'setup' ' git commit -a -m "Adapt to use modern, simpler English But keep the old version, too, in case some people prefer it." && - git checkout master + git checkout main ) ' @@ -129,7 +132,7 @@ test_expect_success 'pull request when forgot to push' ' ( cd local && git checkout initial && - git merge --ff-only master && + git merge --ff-only main && test_must_fail git request-pull initial "$downstream_url" \ 2>../err ) && @@ -145,9 +148,9 @@ test_expect_success 'pull request after push' ' ( cd local && git checkout initial && - git merge --ff-only master && - git push origin master:for-upstream && - git request-pull initial origin master:for-upstream >../request + git merge --ff-only main && + git push origin main:for-upstream && + git request-pull initial origin main:for-upstream >../request ) && sed -nf read-request.sed <request >digest && { @@ -172,9 +175,9 @@ test_expect_success 'request asks HEAD to be pulled' ' ( cd local && git checkout initial && - git merge --ff-only master && - git push --tags origin master simplify && - git push origin master:for-upstream && + git merge --ff-only main && + git push --tags origin main simplify && + git push origin main:for-upstream && git request-pull initial "$downstream_url" >../request ) && sed -nf read-request.sed <request >digest && @@ -215,7 +218,7 @@ test_expect_success 'pull request format' ' ( cd local && git checkout initial && - git merge --ff-only master && + git merge --ff-only main && git push origin tags/full && git request-pull initial "$downstream_url" tags/full >../request ) && @@ -243,9 +246,9 @@ test_expect_success 'request-pull ignores OPTIONS_KEEPDASHDASH poison' ' OPTIONS_KEEPDASHDASH=Yes && export OPTIONS_KEEPDASHDASH && git checkout initial && - git merge --ff-only master && - git push origin master:for-upstream && - git request-pull -- initial "$downstream_url" master:for-upstream >../request + git merge --ff-only main && + git push origin main:for-upstream && + git request-pull -- initial "$downstream_url" main:for-upstream >../request ) ' @@ -257,7 +260,7 @@ test_expect_success 'request-pull quotes regex metacharacters properly' ' ( cd local && git checkout initial && - git merge --ff-only master && + git merge --ff-only main && git tag -mrelease v2.0 && git push origin refs/tags/v2.0:refs/tags/v2-0 && test_must_fail git request-pull initial "$downstream_url" tags/v2.0 \ @@ -275,7 +278,7 @@ test_expect_success 'pull request with mismatched object' ' ( cd local && git checkout initial && - git merge --ff-only master && + git merge --ff-only main && git push origin HEAD:refs/tags/full && test_must_fail git request-pull initial "$downstream_url" tags/full \ 2>../err @@ -292,7 +295,7 @@ test_expect_success 'pull request with stale object' ' ( cd local && git checkout initial && - git merge --ff-only master && + git merge --ff-only main && git push origin refs/tags/full && git tag -f -m"Thirty-one days" full && test_must_fail git request-pull initial "$downstream_url" tags/full \ |