From 8e74dace4b878027405c267670f559ff761f8ea6 Mon Sep 17 00:00:00 2001 From: "Rafael G. Martins" Date: Thu, 10 Feb 2022 02:52:01 +0100 Subject: git-receiver: allow deploying from "main" branch if a "main" branch is available and no "master" branch is available, use it. "master" still takes precedence to avoid breaking old setups. --- tests/blogc-git-receiver/check_pre_receive.sh.in | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'tests/blogc-git-receiver/check_pre_receive.sh.in') diff --git a/tests/blogc-git-receiver/check_pre_receive.sh.in b/tests/blogc-git-receiver/check_pre_receive.sh.in index 9ac12df..2cf3c89 100755 --- a/tests/blogc-git-receiver/check_pre_receive.sh.in +++ b/tests/blogc-git-receiver/check_pre_receive.sh.in @@ -29,7 +29,7 @@ EOF cd "${TEMP}/repos/foo.git" SHELL="${SELF}" HOME="${TEMP}" GIT_DIR=. ${TESTS_ENVIRONMENT} ./hooks/pre-receive < "${TEMP}/payload.txt" 2>&1 | tee "${TEMP}/output.txt" -grep "warning: no reference to master branch found. nothing to deploy." "${TEMP}/output.txt" &> /dev/null +grep "warning: no suitable branch found. nothing to deploy." "${TEMP}/output.txt" &> /dev/null cat > "${TEMP}/tmp.txt" < /dev/null cat > "${TEMP}/payload.txt" <&1 | tee "${TEMP}/output.txt" @@ -73,8 +73,8 @@ all: mkdir -p \$(OUTPUT_DIR) echo lol > \$(OUTPUT_DIR)/foo.txt -reset refs/heads/master -commit refs/heads/master +reset refs/heads/main +commit refs/heads/main mark :2 author Rafael G. Martins 1476139736 +0200 committer Rafael G. Martins 1476139736 +0200 @@ -89,7 +89,7 @@ git fast-import < "${TEMP}/tmp.txt" &> /dev/null cat > "${TEMP}/payload.txt" <