From c8e966002a59f4f160579d9f0723e180280ac7d3 Mon Sep 17 00:00:00 2001 From: Phillip Webb Date: Fri, 5 Jun 2020 15:35:06 -0700 Subject: [PATCH] Fixup prepare-forward-merge for master Fix the regex so that merges to master are supported. --- git/hooks/prepare-forward-merge | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/git/hooks/prepare-forward-merge b/git/hooks/prepare-forward-merge index bcd499714e..c27a9c8a22 100755 --- a/git/hooks/prepare-forward-merge +++ b/git/hooks/prepare-forward-merge @@ -32,7 +32,7 @@ def rewrite_message(message_file, fixed) rewritten_message = "" message = File.read(message_file) message.each_line do |line| - match = /^Merge.*branch\ '(.*)'(?:\ into\ (.*))$/.match(line) + match = /^Merge.*branch\ '(.*)'(?:\ into\ (.*))?$/.match(line) if match from_branch = match[1] if from_branch.include? "/"