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.rb6
1 files changed, 6 insertions, 0 deletions
diff --git a/lib/gitlab/git/rugged_impl/use_rugged.rb b/lib/gitlab/git/rugged_impl/use_rugged.rb
index 99091b03cd1..902fa3c7822 100644
--- a/lib/gitlab/git/rugged_impl/use_rugged.rb
+++ b/lib/gitlab/git/rugged_impl/use_rugged.rb
@@ -10,6 +10,12 @@ module Gitlab
Gitlab::GitalyClient.can_use_disk?(repo.storage)
end
+
+ def wrap_rugged_call(&block)
+ Gitlab::GitalyClient::StorageSettings.allow_disk_access do
+ yield
+ end
+ end
end
end
end