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
path: root/lib
diff options
context:
space:
mode:
authorDouwe Maan <douwe@gitlab.com>2017-11-14 12:48:19 +0300
committerWinnie Hellmann <winnie@gitlab.com>2017-11-15 20:21:56 +0300
commit4906f4e6e8c03b29feec1bf97ad115291964522f (patch)
tree67fcc07cb9f59e98d54050795b6422f54b6f2ba0 /lib
parentda4059b752f5925f16c87faaddb6e997e97d1a3e (diff)
Merge branch 'jej/fix-lfs-integrity-with-forks' into 'master'
Handle forks in Gitlab::Checks::LfsIntegrity Closes #39902 See merge request gitlab-org/gitlab-ce!15279 (cherry picked from commit c9515ca541ebaa3ce0a3208ab08eb59c580cbed6) 78ea074f Moved LfsIntegrity specs to own file ebd51744 Handle forks in Gitlab::Checks::LfsIntegrity
Diffstat (limited to 'lib')
-rw-r--r--lib/gitlab/checks/lfs_integrity.rb5
1 files changed, 4 insertions, 1 deletions
diff --git a/lib/gitlab/checks/lfs_integrity.rb b/lib/gitlab/checks/lfs_integrity.rb
index 27a95764dc1..f7276a380dc 100644
--- a/lib/gitlab/checks/lfs_integrity.rb
+++ b/lib/gitlab/checks/lfs_integrity.rb
@@ -15,7 +15,10 @@ module Gitlab
return false unless new_lfs_pointers.present?
- existing_count = @project.lfs_objects.where(oid: new_lfs_pointers.map(&:lfs_oid)).count
+ existing_count = @project.lfs_storage_project
+ .lfs_objects
+ .where(oid: new_lfs_pointers.map(&:lfs_oid))
+ .count
existing_count != new_lfs_pointers.count
end