Commit fd161472 authored by Valery Sizov's avatar Valery Sizov

fix pushing to new branch when check of author of commit is enabled

parent b620aa0b
......@@ -119,6 +119,10 @@ module Gitlab
# Check commit messages unless its branch removal
if git_hook.commit_validation? && newrev !~ /00000000/
if oldrev == Gitlab::Git::BLANK_SHA
oldrev = project.default_branch
end
commits = project.repository.commits_between(oldrev, newrev)
commits.each do |commit|
if git_hook.commit_message_regex.present?
......
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