summaryrefslogtreecommitdiff
path: root/t/t5571-pre-push-hook.sh
diff options
context:
space:
mode:
authorJohannes Schindelin <johannes.schindelin@gmx.de>2020-11-18 23:44:34 (GMT)
committerJunio C Hamano <gitster@pobox.com>2020-11-19 23:44:18 (GMT)
commit028cb644ec6450fa9438ba6b6d100c0f34e029a5 (patch)
tree4e438ef5f6bc52e4c94b94bfefd4d3bf73df51fa /t/t5571-pre-push-hook.sh
parent3ac8f6301ee9d4bf3f9e58b3ef12ba536005cb9d (diff)
downloadgit-028cb644ec6450fa9438ba6b6d100c0f34e029a5.zip
git-028cb644ec6450fa9438ba6b6d100c0f34e029a5.tar.gz
git-028cb644ec6450fa9438ba6b6d100c0f34e029a5.tar.bz2
t55[4-9]*: adjust the references to the default branch name "main"
This trick was performed via $ (cd t && sed -i -e 's/master/main/g' -e 's/MASTER/MAIN/g' \ -e 's/Master/Main/g' -e 's/retsam/niam/g' \ -- t55[4-9]*.sh t556x*) This allows us to define `GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main` for those tests. Note that t5541 uses the reversed `master` name: `retsam`. We replace it by the equivalent for `main`: `niam`. Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 't/t5571-pre-push-hook.sh')
-rwxr-xr-xt/t5571-pre-push-hook.sh6
1 files changed, 3 insertions, 3 deletions
diff --git a/t/t5571-pre-push-hook.sh b/t/t5571-pre-push-hook.sh
index 971ed3d..ad8d580 100755
--- a/t/t5571-pre-push-hook.sh
+++ b/t/t5571-pre-push-hook.sh
@@ -1,7 +1,7 @@
#!/bin/sh
test_description='check pre-push hooks'
-GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=master
+GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main
export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME
. ./test-lib.sh
@@ -51,11 +51,11 @@ EOF
cat >expected <<EOF
parent1
repo1
-refs/heads/master $COMMIT2 refs/heads/foreign $COMMIT1
+refs/heads/main $COMMIT2 refs/heads/foreign $COMMIT1
EOF
test_expect_success 'push with hook' '
- git push parent1 master:foreign &&
+ git push parent1 main:foreign &&
diff expected actual
'