diff options
author | Sean McGivern <sean@mcgivern.me.uk> | 2018-06-19 11:40:52 +0000 |
---|---|---|
committer | Sean McGivern <sean@mcgivern.me.uk> | 2018-06-19 11:40:52 +0000 |
commit | d6c57146c5a8f122bd7313cbea1a236d45977650 (patch) | |
tree | 2fb94d776bd91837bcb362b94d64eef6c12d31c7 /lib | |
parent | 57a2ac1869de943f86aa3465caa37e8f1ced0099 (diff) | |
parent | 4f9068dfc06269ca7e2247fb0be2796452546de1 (diff) | |
download | gitlab-ce-d6c57146c5a8f122bd7313cbea1a236d45977650.tar.gz |
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')
-rw-r--r-- | lib/gitlab/checks/commit_check.rb | 2 |
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 |