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:
authorDouwe Maan <douwe@gitlab.com>2017-11-01 20:33:41 +0300
committerDouwe Maan <douwe@gitlab.com>2017-11-01 20:33:41 +0300
commite65bbc0ca48aebcf06b83ffd2cb2cfaa6f5ed102 (patch)
tree6dcfc8a03d1ddcce4b58d4366f4a23a240e193ed /lib/gitlab/git/repository.rb
parent45b756b27af13ddc74a7081d06280fda99d3ff66 (diff)
parentfb3f9c6e507b232649757e996243e292064b32bb (diff)
Merge branch 'jej/lfs-change-detection' into 'master'
Detect changes to LFS pointers for pruning and integrity check See merge request gitlab-org/gitlab-ce!14785
Diffstat (limited to 'lib/gitlab/git/repository.rb')
-rw-r--r--lib/gitlab/git/repository.rb8
1 files changed, 8 insertions, 0 deletions
diff --git a/lib/gitlab/git/repository.rb b/lib/gitlab/git/repository.rb
index fc8af38d4d9..a9e4e1130c3 100644
--- a/lib/gitlab/git/repository.rb
+++ b/lib/gitlab/git/repository.rb
@@ -290,6 +290,14 @@ module Gitlab
end
end
+ def batch_existence(object_ids, existing: true)
+ filter_method = existing ? :select : :reject
+
+ object_ids.public_send(filter_method) do |oid| # rubocop:disable GitlabSecurity/PublicSend
+ rugged.exists?(oid)
+ end
+ end
+
# Returns an Array of branch and tag names
def ref_names
branch_names + tag_names