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:
authorStan Hu <stanhu@gmail.com>2017-11-21 10:28:49 +0300
committerStan Hu <stanhu@gmail.com>2017-11-21 10:28:49 +0300
commitf80654c4e13ff42ca03bacb59b924b9960f59148 (patch)
treec2e01de8ae612d6adbbfbbbcccbf880cabe0be0e /lib/gitlab/shell_adapter.rb
parent9a8f094e34e9f6da5932f239a510abcd996a79b3 (diff)
Memoize GitlabShellAdapter for performance and ease of testing
Port of https://gitlab.com/gitlab-org/gitlab-ee/merge_requests/3463#note_47990536
Diffstat (limited to 'lib/gitlab/shell_adapter.rb')
-rw-r--r--lib/gitlab/shell_adapter.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/gitlab/shell_adapter.rb b/lib/gitlab/shell_adapter.rb
index fbe2a7a0d72..053dd4ab9e0 100644
--- a/lib/gitlab/shell_adapter.rb
+++ b/lib/gitlab/shell_adapter.rb
@@ -5,7 +5,7 @@
module Gitlab
module ShellAdapter
def gitlab_shell
- Gitlab::Shell.new
+ @gitlab_shell ||= Gitlab::Shell.new
end
end
end