From ef9c6279e75e9edba4d93e28ae12a6bb35f30558 Mon Sep 17 00:00:00 2001 From: Stefan Reimer Date: Fri, 26 Mar 2021 13:13:25 +0100 Subject: [PATCH] Fix: pre-receive-git-hook regex more tolerant --- scripts/git-pre-receive-hook.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/git-pre-receive-hook.sh b/scripts/git-pre-receive-hook.sh index d80aaeb6..2857d5e0 100644 --- a/scripts/git-pre-receive-hook.sh +++ b/scripts/git-pre-receive-hook.sh @@ -8,7 +8,7 @@ set -e zero_commit='0000000000000000000000000000000000000000' -msg_regex='/^((fixup! |squash! )?(\w+)(?:\(([^\)\s]+)\))?: (.+))(?:\n|$){0,2}?((?:^.+(\n|$))+(?:\n|$){0,2}?)+((?:^.+(\n|$))+)+/gm' +msg_regex='^((fixup! |squash! )?(\w+)(?:\(([^\)\s]+)\))?: (.+))(?:\n|$){0,2}?((?:^.+(\n|$))+(?:\n|$){0,2}?)*((?:^.+(\n|$))+)*' while read -r oldrev newrev refname; do # Branch or tag got deleted, ignore the push