Commit c6f7f09d authored by Dmitriy Zaporozhets's avatar Dmitriy Zaporozhets

Merge branch 'fix_git_hook' into 'master'

Fix pushing to new branch when 'Check whether author is a GitLab user' is enebled.

See merge request !301
parents 1d659d6d fd161472
......@@ -128,6 +128,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