ruby/lib/gitlab/git/gitlab_projects.rb
# Builds a small shell script that can be used to execute SSH with a set of
# custom options.
#
# Options are expanded as `'-oKey="Value"'`, so SSH will correctly interpret
# paths with spaces in them. We trust the user not to embed single or double
# quotes in the key or value.
Builds a small shell script that can be used to execute SSH with a set of
custom options.

Options are expanded as `'-oKey="Value"'`, so SSH will correctly interpret
paths with spaces in them. We trust the user not to embed single or double
quotes in the key or value.
Builds a small shell script that can be used to execute SSH with a set of custom options . Options are expanded as ` ' - oKey = " Value " ' ` so SSH will correctly interpret paths with spaces in them . We trust the user not to embed single or double quotes in the key or value .
def custom_ssh_script(options = {})
        args = options.map { |k, v| %{'-o#{k}="#{v}"'} }.join(' ')
        [
          "#!/bin/sh",
          "exec ssh #{args} \"$@\""
        ].join("\n")
      end
def custom_ssh_script ( options = { } ) args = options . map { | k , v | %{'-o#{k}="#{v}"'} } . join ( ' ' ) [ "#!/bin/sh" , "exec ssh #{args} \"$@\"" ] . join ( "\n" ) end
Builds a small shell script that can be used to execute SSH with a set of
custom options.
Builds a small shell script that can be used to execute SSH with a set of custom options .
options
<not_specific>