diff options
author | Johannes Schindelin <johannes.schindelin@gmx.de> | 2020-11-18 23:44:36 +0000 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2020-11-19 15:44:18 -0800 |
commit | 1550bb6ed0055895fe90a8b1eda95408ddf0d813 (patch) | |
tree | 3c87d38eb2cf6d37edb2f6762773ad70fba5fea5 /t/t6200-fmt-merge-msg.sh | |
parent | t5[6-9]*: adjust the references to the default branch name "main" (diff) | |
download | tgif-1550bb6ed0055895fe90a8b1eda95408ddf0d813.tar.xz |
t6[0-3]*: adjust the references to the default branch name "main"
Carefully excluding t6300, which sees independent development elsewhere
at the time of writing, we use `main` as the default branch name in
t6[0-3]*. This trick was performed via
$ (cd t &&
sed -i -e 's/master/main/g' -e 's/MASTER/MAIN/g' \
-e 's/Master/Main/g' -- t6[0-3]*.sh &&
git checkout HEAD -- t6300\*)
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/t6200-fmt-merge-msg.sh')
-rwxr-xr-x | t/t6200-fmt-merge-msg.sh | 52 |
1 files changed, 26 insertions, 26 deletions
diff --git a/t/t6200-fmt-merge-msg.sh b/t/t6200-fmt-merge-msg.sh index 725b356d1e..44f55d93fe 100755 --- a/t/t6200-fmt-merge-msg.sh +++ b/t/t6200-fmt-merge-msg.sh @@ -5,7 +5,7 @@ test_description='fmt-merge-msg test' -GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=master +GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME . ./test-lib.sh @@ -84,7 +84,7 @@ test_expect_success GPG 'set up a signed tag' ' test_expect_success 'message for merging local branch' ' echo "Merge branch ${apos}left${apos}" >expected && - git checkout master && + git checkout main && git fetch . left && git fmt-merge-msg <.git/FETCH_HEAD >actual && @@ -92,7 +92,7 @@ test_expect_success 'message for merging local branch' ' ' test_expect_success GPG 'message for merging local tag signed by good key' ' - git checkout master && + git checkout main && git fetch . signed-good-tag && git fmt-merge-msg <.git/FETCH_HEAD >actual 2>&1 && grep "^Merge tag ${apos}signed-good-tag${apos}" actual && @@ -101,7 +101,7 @@ test_expect_success GPG 'message for merging local tag signed by good key' ' ' test_expect_success GPG 'message for merging local tag signed by unknown key' ' - git checkout master && + git checkout main && git fetch . signed-good-tag && GNUPGHOME=. git fmt-merge-msg <.git/FETCH_HEAD >actual 2>&1 && grep "^Merge tag ${apos}signed-good-tag${apos}" actual && @@ -112,7 +112,7 @@ test_expect_success GPG 'message for merging local tag signed by unknown key' ' test_expect_success 'message for merging external branch' ' echo "Merge branch ${apos}left${apos} of $(pwd)" >expected && - git checkout master && + git checkout main && git fetch "$(pwd)" left && git fmt-merge-msg <.git/FETCH_HEAD >actual && @@ -136,7 +136,7 @@ test_expect_success '[merge] summary/log configuration' ' test_config merge.log true && test_unconfig merge.summary && - git checkout master && + git checkout main && test_tick && git fetch . left && @@ -145,7 +145,7 @@ test_expect_success '[merge] summary/log configuration' ' test_unconfig merge.log && test_config merge.summary true && - git checkout master && + git checkout main && test_tick && git fetch . left && @@ -156,7 +156,7 @@ test_expect_success '[merge] summary/log configuration' ' ' test_expect_success 'setup FETCH_HEAD' ' - git checkout master && + git checkout main && test_tick && git fetch . left ' @@ -284,7 +284,7 @@ test_expect_success 'fmt-merge-msg -m' ' test_unconfig merge.log && test_unconfig merge.summary && - git checkout master && + git checkout main && git fetch "$(pwd)" left && git fmt-merge-msg -m "Sync with left" <.git/FETCH_HEAD >actual && git fmt-merge-msg --log -m "Sync with left" \ @@ -326,28 +326,28 @@ test_expect_success 'setup: expected shortlog for two branches' ' test_expect_success 'shortlog for two branches' ' test_config merge.log true && test_unconfig merge.summary && - git checkout master && + git checkout main && test_tick && git fetch . left right && git fmt-merge-msg <.git/FETCH_HEAD >actual1 && test_unconfig merge.log && test_config merge.summary true && - git checkout master && + git checkout main && test_tick && git fetch . left right && git fmt-merge-msg <.git/FETCH_HEAD >actual2 && test_config merge.log yes && test_unconfig merge.summary && - git checkout master && + git checkout main && test_tick && git fetch . left right && git fmt-merge-msg <.git/FETCH_HEAD >actual3 && test_unconfig merge.log && test_config merge.summary yes && - git checkout master && + git checkout main && test_tick && git fetch . left right && git fmt-merge-msg <.git/FETCH_HEAD >actual4 && @@ -361,7 +361,7 @@ test_expect_success 'shortlog for two branches' ' test_expect_success 'merge-msg -F' ' test_unconfig merge.log && test_config merge.summary yes && - git checkout master && + git checkout main && test_tick && git fetch . left right && git fmt-merge-msg -F .git/FETCH_HEAD >actual && @@ -371,7 +371,7 @@ test_expect_success 'merge-msg -F' ' test_expect_success 'merge-msg -F in subdirectory' ' test_unconfig merge.log && test_config merge.summary yes && - git checkout master && + git checkout main && test_tick && git fetch . left right && mkdir sub && @@ -411,7 +411,7 @@ test_expect_success 'merge-msg tag' ' test_unconfig merge.log && test_config merge.summary yes && - git checkout master && + git checkout main && test_tick && git fetch . tag tag-r3 && @@ -441,7 +441,7 @@ test_expect_success 'merge-msg two tags' ' test_unconfig merge.log && test_config merge.summary yes && - git checkout master && + git checkout main && test_tick && git fetch . tag tag-r3 tag tag-l5 && @@ -471,7 +471,7 @@ test_expect_success 'merge-msg tag and branch' ' test_unconfig merge.log && test_config merge.summary yes && - git checkout master && + git checkout main && test_tick && git fetch . tag tag-r3 left && @@ -498,7 +498,7 @@ test_expect_success 'merge-msg lots of commits' ' test_config merge.summary yes && - git checkout master && + git checkout main && test_tick && git fetch . long && @@ -509,11 +509,11 @@ test_expect_success 'merge-msg lots of commits' ' test_expect_success 'merge-msg with "merging" an annotated tag' ' test_config merge.log true && - git checkout master^0 && + git checkout main^0 && git commit --allow-empty -m "One step ahead" && git tag -a -m "An annotated one" annote HEAD && - git checkout master && + git checkout main && git fetch . annote && git fmt-merge-msg <.git/FETCH_HEAD >actual && @@ -546,23 +546,23 @@ test_expect_success 'merge-msg with "merging" an annotated tag' ' ' test_expect_success 'merge.suppressDest configuration' ' - git checkout -B side master && + git checkout -B side main && git commit --allow-empty -m "One step ahead" && - git checkout master && + git checkout main && git fetch . side && git -c merge.suppressDest="" fmt-merge-msg <.git/FETCH_HEAD >full.1 && head -n1 full.1 >actual && - grep -e "Merge branch .side. into master" actual && + grep -e "Merge branch .side. into main" actual && git -c merge.suppressDest="mast" fmt-merge-msg <.git/FETCH_HEAD >full.2 && head -n1 full.2 >actual && - grep -e "Merge branch .side. into master$" actual && + grep -e "Merge branch .side. into main$" actual && git -c merge.suppressDest="ma?*[rn]" fmt-merge-msg <.git/FETCH_HEAD >full.3 && head -n1 full.3 >actual && grep -e "Merge branch .side." actual && - ! grep -e " into master$" actual + ! grep -e " into main$" actual ' test_done |