Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSean McGivern <sean@mcgivern.me.uk>2018-06-19 14:40:52 +0300
committerSean McGivern <sean@mcgivern.me.uk>2018-06-19 14:40:52 +0300
commitd6c57146c5a8f122bd7313cbea1a236d45977650 (patch)
tree2fb94d776bd91837bcb362b94d64eef6c12d31c7 /lib/gitlab
parent57a2ac1869de943f86aa3465caa37e8f1ced0099 (diff)
parent4f9068dfc06269ca7e2247fb0be2796452546de1 (diff)
Merge branch 'sh-optimize-locks-check-ce' into 'master'
Eliminate N+1 queries in LFS file lock checks during a push See merge request gitlab-org/gitlab-ce!19978
Diffstat (limited to 'lib/gitlab')
-rw-r--r--lib/gitlab/checks/commit_check.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/gitlab/checks/commit_check.rb b/lib/gitlab/checks/commit_check.rb
index 43a52b493bb..22310e313ac 100644
--- a/lib/gitlab/checks/commit_check.rb
+++ b/lib/gitlab/checks/commit_check.rb
@@ -37,7 +37,7 @@ module Gitlab
def validate_lfs_file_locks?
strong_memoize(:validate_lfs_file_locks) do
- project.lfs_enabled? && project.lfs_file_locks.any? && newrev && oldrev
+ project.lfs_enabled? && newrev && oldrev && project.any_lfs_file_locks?
end
end