From 8f37854b187a4539dd37752b2631849c94bd627b Mon Sep 17 00:00:00 2001 From: Johannes Schindelin Date: Wed, 18 Nov 2020 23:44:27 +0000 Subject: t4*: adjust the references to the default branch name "main" Carefully excluding t4013 and t4015, which see independent development elsewhere at the time of writing, we use `main` as the default branch name in t4*. This trick was performed via $ (cd t && sed -i -e 's/master/main/g' -e 's/MASTER/MAIN/g' \ -e 's/Master/Main/g' -- t4*.sh t4211/*.export && git checkout HEAD -- t4013\*) This allows us to define `GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main` for those tests. Signed-off-by: Johannes Schindelin Signed-off-by: Junio C Hamano --- t/t4204-patch-id.sh | 28 ++++++++++++++-------------- 1 file changed, 14 insertions(+), 14 deletions(-) (limited to 't/t4204-patch-id.sh') diff --git a/t/t4204-patch-id.sh b/t/t4204-patch-id.sh index 46ecb777f4..f120857c20 100755 --- a/t/t4204-patch-id.sh +++ b/t/t4204-patch-id.sh @@ -2,7 +2,7 @@ test_description='git patch-id' -GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=master +GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME . ./test-lib.sh @@ -16,9 +16,9 @@ test_expect_success 'setup' ' test_write_lines $as b >foo && test_write_lines $as b >bar && git commit -a -m first && - git checkout -b same master && + git checkout -b same main && git commit --amend -m same-msg && - git checkout -b notsame master && + git checkout -b notsame main && echo c >foo && echo c >bar && git commit --amend -a -m notsame-msg && @@ -49,31 +49,31 @@ get_patch_id () { } test_expect_success 'patch-id detects equality' ' - get_patch_id master && + get_patch_id main && get_patch_id same && - test_cmp patch-id_master patch-id_same + test_cmp patch-id_main patch-id_same ' test_expect_success 'patch-id detects inequality' ' - get_patch_id master && + get_patch_id main && get_patch_id notsame && - ! test_cmp patch-id_master patch-id_notsame + ! test_cmp patch-id_main patch-id_notsame ' test_expect_success 'patch-id supports git-format-patch output' ' - get_patch_id master && + get_patch_id main && git checkout same && git format-patch -1 --stdout | calc_patch_id same && - test_cmp patch-id_master patch-id_same && + test_cmp patch-id_main patch-id_same && set $(git format-patch -1 --stdout | git patch-id) && test "$2" = $(git rev-parse HEAD) ' test_expect_success 'whitespace is irrelevant in footer' ' - get_patch_id master && + get_patch_id main && git checkout same && git format-patch -1 --stdout | sed "s/ \$//" | calc_patch_id same && - test_cmp patch-id_master patch-id_same + test_cmp patch-id_main patch-id_same ' cmp_patch_id () { @@ -91,7 +91,7 @@ test_patch_id_file_order () { shift name="order-${1}-$relevant" shift - get_top_diff "master" | calc_patch_id "$name" "$@" && + get_top_diff "main" | calc_patch_id "$name" "$@" && git checkout same && git format-patch -1 --stdout -O foo-then-bar | calc_patch_id "ordered-$name" "$@" && @@ -140,10 +140,10 @@ test_expect_success '--stable overrides patchid.stable = false' ' ' test_expect_success 'patch-id supports git-format-patch MIME output' ' - get_patch_id master && + get_patch_id main && git checkout same && git format-patch -1 --attach --stdout | calc_patch_id same && - test_cmp patch-id_master patch-id_same + test_cmp patch-id_main patch-id_same ' test_expect_success 'patch-id respects config from subdir' ' -- cgit v1.2.3