diff options
Diffstat (limited to 't/t7502-commit-porcelain.sh')
-rwxr-xr-x | t/t7502-commit-porcelain.sh | 21 |
1 files changed, 12 insertions, 9 deletions
diff --git a/t/t7502-commit-porcelain.sh b/t/t7502-commit-porcelain.sh index 14c92e4c25..6396897cc8 100755 --- a/t/t7502-commit-porcelain.sh +++ b/t/t7502-commit-porcelain.sh @@ -2,6 +2,9 @@ test_description='git commit porcelain-ish' +GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main +export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME + . ./test-lib.sh commit_msg_is () { @@ -10,7 +13,7 @@ commit_msg_is () { printf "%s" "$(git log --pretty=format:%s%b -1)" >$actual && printf "%s" "$1" >$expect && - test_i18ncmp $expect $actual + test_cmp $expect $actual } # Arguments: [<prefix] [<commit message>] [<commit options>] @@ -32,7 +35,7 @@ check_summary_oneline() { SUMMARY_POSTFIX="$(git log -1 --pretty='format:%h')" echo "[$SUMMARY_PREFIX $SUMMARY_POSTFIX] $2" >exp && - test_i18ncmp exp act + test_cmp exp act } test_expect_success 'output summary format' ' @@ -76,7 +79,7 @@ test_expect_success 'output summary format for merges' ' output_tests_cleanup() { # this is needed for "do not fire editor in the presence of conflicts" - git checkout master && + git checkout main && # this is needed for the "partial removal" test to pass git rm file1 && @@ -297,7 +300,7 @@ echo "sample # with '#' will be ignored, and an empty message aborts the commit." >expect test_expect_success 'cleanup commit messages (strip option,-F,-e): output' ' - test_i18ncmp expect actual + test_cmp expect actual ' test_expect_success 'cleanup commit message (fail on invalid cleanup mode option)' ' @@ -440,7 +443,7 @@ test_expect_success 'do not fire editor in the presence of conflicts' ' git add g && git commit -m "add g" && git branch second && - echo master >g && + echo main >g && echo g >h && git add g h && git commit -m "modify g and add h" && @@ -449,7 +452,7 @@ test_expect_success 'do not fire editor in the presence of conflicts' ' git add g && git commit -m second && # Must fail due to conflict - test_must_fail git cherry-pick -n master && + test_must_fail git cherry-pick -n main && echo "editor not started" >.git/result && ( GIT_EDITOR="\"$(pwd)/.git/FAKE_EDITOR\"" && @@ -478,9 +481,9 @@ git reset -q --hard test_expect_success 'Hand committing of a redundant merge removes dups' ' - git rev-parse second master >expect && - test_must_fail git merge second master && - git checkout master g && + git rev-parse second main >expect && + test_must_fail git merge second main && + git checkout main g && EDITOR=: git commit -a && git cat-file commit HEAD >raw && sed -n -e "s/^parent //p" -e "/^$/q" raw >actual && |