diff options
author | Johannes Schindelin <johannes.schindelin@gmx.de> | 2020-11-19 02:44:40 +0300 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2020-11-20 02:44:18 +0300 |
commit | 1e2ae142c06f7648a646278947bbcb61173f37eb (patch) | |
tree | e1050696a0fb5f407ac538f1c944e78d420da791 /t/t7614-merge-signoff.sh | |
parent | 01dc81336dc10c8f2350454c755a8a0ab676a9c9 (diff) |
t7[5-9]*: adjust the references to the default branch name "main"
Excluding t7817, which is added in an unrelated patch series at the time
of writing, this adjusts t7[5-9]*. This trick was performed via
$ (cd t &&
sed -i -e 's/master/main/g' -e 's/MASTER/MAIN/g' \
-e 's/Master/Main/g' -- t7[5-9]*.sh)
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/t7614-merge-signoff.sh')
-rwxr-xr-x | t/t7614-merge-signoff.sh | 26 |
1 files changed, 13 insertions, 13 deletions
diff --git a/t/t7614-merge-signoff.sh b/t/t7614-merge-signoff.sh index ea4eeee35f..fee258d4f0 100755 --- a/t/t7614-merge-signoff.sh +++ b/t/t7614-merge-signoff.sh @@ -5,7 +5,7 @@ test_description='git merge --signoff This test runs git merge --signoff and makes sure that it works. ' -GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=master +GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME . ./test-lib.sh @@ -14,17 +14,17 @@ export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME test_setup() { # Expected commit message after merge --signoff cat >expected-signed <<EOF && -Merge branch 'master' into other-branch +Merge branch 'main' into other-branch Signed-off-by: $(git var GIT_COMMITTER_IDENT | sed -e "s/>.*/>/") EOF # Expected commit message after merge without --signoff (or with --no-signoff) cat >expected-unsigned <<EOF && -Merge branch 'master' into other-branch +Merge branch 'main' into other-branch EOF - # Initial commit and feature branch to merge master into it. + # Initial commit and feature branch to merge main into it. git commit --allow-empty -m "Initial empty commit" && git checkout -b other-branch && test_commit other-branch file1 1 @@ -41,30 +41,30 @@ test_expect_success 'setup' ' # Test with --signoff flag test_expect_success 'git merge --signoff adds a sign-off line' ' - git checkout master && - test_commit master-branch-2 file2 2 && + git checkout main && + test_commit main-branch-2 file2 2 && git checkout other-branch && - git merge master --signoff --no-edit && + git merge main --signoff --no-edit && git cat-file commit HEAD | sed -e "1,/^\$/d" >actual && test_cmp expected-signed actual ' # Test without --signoff flag test_expect_success 'git merge does not add a sign-off line' ' - git checkout master && - test_commit master-branch-3 file3 3 && + git checkout main && + test_commit main-branch-3 file3 3 && git checkout other-branch && - git merge master --no-edit && + git merge main --no-edit && git cat-file commit HEAD | sed -e "1,/^\$/d" >actual && test_cmp expected-unsigned actual ' # Test for --no-signoff flag test_expect_success 'git merge --no-signoff flag cancels --signoff flag' ' - git checkout master && - test_commit master-branch-4 file4 4 && + git checkout main && + test_commit main-branch-4 file4 4 && git checkout other-branch && - git merge master --no-edit --signoff --no-signoff && + git merge main --no-edit --signoff --no-signoff && git cat-file commit HEAD | sed -e "1,/^\$/d" >actual && test_cmp expected-unsigned actual ' |