Commit f5d3bd0e authored by James Lopez's avatar James Lopez

avoid githooks if annex commit is pushed to normal branch

parent d95c0f5f
......@@ -213,6 +213,7 @@ module Gitlab
end
commits.each do |commit|
next if commit_from_annex_sync?(commit, ref)
if status_object = check_commit(commit, git_hook)
return status_object
end
......@@ -364,5 +365,12 @@ module Gitlab
true
end
def commit_from_annex_sync?(rev, ref)
return false unless Gitlab.config.gitlab_shell.git_annex_enabled
# Commit present in synced/current_branch, so avoid checking git hooks on this
project.repository.branch_names_contains(rev).contains? "synced/#{ref}"
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