summaryrefslogtreecommitdiff
path: root/lib/gitlab/git/rugged_impl/use_rugged.rb
diff options
context:
space:
mode:
Diffstat (limited to 'lib/gitlab/git/rugged_impl/use_rugged.rb')
-rw-r--r--lib/gitlab/git/rugged_impl/use_rugged.rb16
1 files changed, 16 insertions, 0 deletions
diff --git a/lib/gitlab/git/rugged_impl/use_rugged.rb b/lib/gitlab/git/rugged_impl/use_rugged.rb
new file mode 100644
index 00000000000..99091b03cd1
--- /dev/null
+++ b/lib/gitlab/git/rugged_impl/use_rugged.rb
@@ -0,0 +1,16 @@
+# frozen_string_literal: true
+
+module Gitlab
+ module Git
+ module RuggedImpl
+ module UseRugged
+ def use_rugged?(repo, feature_key)
+ feature = Feature.get(feature_key)
+ return feature.enabled? if Feature.persisted?(feature)
+
+ Gitlab::GitalyClient.can_use_disk?(repo.storage)
+ end
+ end
+ end
+ end
+end