From 966b4be2765a9bd80febfd4660a1fa9e6408d143 Mon Sep 17 00:00:00 2001 From: Johannes Schindelin Date: Wed, 18 Nov 2020 23:44:29 +0000 Subject: t5[0-4]*: adjust the references to the default branch name "main" Carefully excluding t5310, which is developed independently of the current patch series at the time of writing, we now use `main` as default branch in t5[0-4]*. This trick was performed via $ (cd t && sed -i -e 's/master/main/g' -e 's/MASTER/MAIN/g' \ -e 's/Master/Main/g' -- t5[0-4]*.sh && git checkout HEAD -- t5310\*) 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/t5403-post-checkout-hook.sh | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 't/t5403-post-checkout-hook.sh') diff --git a/t/t5403-post-checkout-hook.sh b/t/t5403-post-checkout-hook.sh index ed91aadd95..1ec9e23be7 100755 --- a/t/t5403-post-checkout-hook.sh +++ b/t/t5403-post-checkout-hook.sh @@ -4,7 +4,7 @@ # test_description='Test the post-checkout hook.' -GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=master +GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME . ./test-lib.sh @@ -23,7 +23,7 @@ test_expect_success setup ' test_expect_success 'post-checkout receives the right arguments with HEAD unchanged ' ' test_when_finished "rm -f .git/post-checkout.args" && - git checkout master && + git checkout main && read old new flag <.git/post-checkout.args && test $old = $new && test $flag = 1 ' @@ -44,14 +44,14 @@ test_expect_success 'post-checkout receives the right args with HEAD changed ' ' test_expect_success 'post-checkout receives the right args when not switching branches ' ' test_when_finished "rm -f .git/post-checkout.args" && - git checkout master -- three.t && + git checkout main -- three.t && read old new flag <.git/post-checkout.args && test $old = $new && test $flag = 0 ' test_expect_success 'post-checkout is triggered on rebase' ' test_when_finished "rm -f .git/post-checkout.args" && - git checkout -b rebase-test master && + git checkout -b rebase-test main && rm -f .git/post-checkout.args && git rebase rebase-on-me && read old new flag <.git/post-checkout.args && -- cgit v1.2.3