summaryrefslogtreecommitdiff
path: root/lib/gitlab/checks
diff options
context:
space:
mode:
authorZeger-Jan van de Weg <git@zjvandeweg.nl>2018-06-19 15:01:36 +0200
committerZeger-Jan van de Weg <git@zjvandeweg.nl>2018-06-19 15:35:17 +0200
commitc2cdefd4413e2b9946d2a50461b338fc60cef1af (patch)
tree3619a07318e6095594264df72cea1c908a3df1b0 /lib/gitlab/checks
parentd04ac74556e74df89da8f46ed4188b0376b71c3d (diff)
downloadgitlab-ce-c2cdefd4413e2b9946d2a50461b338fc60cef1af.tar.gz
Force push is handled by Gitaly nowzj-force-push-opt-out
Closes gitlab-org/gitaly#348
Diffstat (limited to 'lib/gitlab/checks')
-rw-r--r--lib/gitlab/checks/force_push.rb16
1 files changed, 4 insertions, 12 deletions
diff --git a/lib/gitlab/checks/force_push.rb b/lib/gitlab/checks/force_push.rb
index c9c3050cfc2..87af4a90572 100644
--- a/lib/gitlab/checks/force_push.rb
+++ b/lib/gitlab/checks/force_push.rb
@@ -7,18 +7,10 @@ module Gitlab
# Created or deleted branch
return false if Gitlab::Git.blank_ref?(oldrev) || Gitlab::Git.blank_ref?(newrev)
- GitalyClient.migrate(:force_push) do |is_enabled|
- if is_enabled
- !project
- .repository
- .gitaly_commit_client
- .ancestor?(oldrev, newrev)
- else
- Gitlab::Git::RevList.new(
- project.repository.raw, oldrev: oldrev, newrev: newrev
- ).missed_ref.present?
- end
- end
+ !project
+ .repository
+ .gitaly_commit_client
+ .ancestor?(oldrev, newrev)
end
end
end