Commit 8290e23e authored by Valery Sizov's avatar Valery Sizov

Git hook messages: Improved error description

parent 5509a5e8
...@@ -143,7 +143,7 @@ module Gitlab ...@@ -143,7 +143,7 @@ module Gitlab
if git_hook.file_name_regex.present? if git_hook.file_name_regex.present?
commit.diffs.each do |diff| commit.diffs.each do |diff|
if (diff.renamed_file || diff.new_file) && diff.new_path =~ Regexp.new(git_hook.file_name_regex) if (diff.renamed_file || diff.new_file) && diff.new_path =~ Regexp.new(git_hook.file_name_regex)
return build_status_object(false, "File name #{diff.new_path} does not follow the pattern") return build_status_object(false, "File name #{diff.new_path.inspect} does not follow the pattern")
end end
end end
end end
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment