diff options
author | Douwe Maan <douwe@gitlab.com> | 2017-11-14 09:48:19 +0000 |
---|---|---|
committer | Douwe Maan <douwe@gitlab.com> | 2017-11-14 09:48:19 +0000 |
commit | c9515ca541ebaa3ce0a3208ab08eb59c580cbed6 (patch) | |
tree | 940a4de00c36470ae7910fd7e15dd0338c2d6472 /lib | |
parent | 58bd04ab75d99fa9be0d9568c442704d400e8b1d (diff) | |
parent | ebd51744729cb1b68754f8ba4d7f9adcec28d58d (diff) | |
download | gitlab-ce-c9515ca541ebaa3ce0a3208ab08eb59c580cbed6.tar.gz |
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
Diffstat (limited to 'lib')
-rw-r--r-- | lib/gitlab/checks/lfs_integrity.rb | 5 |
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 |