lib/overcommit/hook/commit_msg/message_format.rb in overcommit-0.38.0 vs lib/overcommit/hook/commit_msg/message_format.rb in overcommit-0.39.0

- old
+ new

@@ -15,13 +15,15 @@ return if pattern.empty? expected_pattern_message = config['expected_pattern_message'] sample_message = config['sample_message'] - [ - 'Commit message pattern mismatch.', - "Expected : #{expected_pattern_message}", - "Sample : #{sample_message}" - ].join("\n") unless message =~ /#{pattern}/ + unless message =~ /#{pattern}/ + [ + 'Commit message pattern mismatch.', + "Expected : #{expected_pattern_message}", + "Sample : #{sample_message}" + ].join("\n") + end end end end