diff options
author | Stan Hu <stanhu@gmail.com> | 2017-11-20 23:28:49 -0800 |
---|---|---|
committer | Stan Hu <stanhu@gmail.com> | 2017-11-20 23:28:49 -0800 |
commit | f80654c4e13ff42ca03bacb59b924b9960f59148 (patch) | |
tree | c2e01de8ae612d6adbbfbbbcccbf880cabe0be0e | |
parent | 9a8f094e34e9f6da5932f239a510abcd996a79b3 (diff) | |
download | gitlab-ce-f80654c4e13ff42ca03bacb59b924b9960f59148.tar.gz |
Memoize GitlabShellAdapter for performance and ease of testing
Port of https://gitlab.com/gitlab-org/gitlab-ee/merge_requests/3463#note_47990536
-rw-r--r-- | lib/gitlab/shell_adapter.rb | 2 |
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 |