8000
We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 34432d9 + d2389b2 commit cb0bf67Copy full SHA for cb0bf67
src/libgit2/transports/ssh_exec.c
@@ -158,9 +158,10 @@ static int get_ssh_cmdline(
158
else if ((error = git_config__get_string_buf(&ssh_cmd, cfg, "core.sshcommand")) < 0 && error != GIT_ENOTFOUND)
159
goto done;
160
161
- error = git_str_printf(out, "%s -p %s \"%s%s%s\" \"%s\" \"%s\"",
+ error = git_str_printf(out, "%s %s %s \"%s%s%s\" \"%s\" \"%s\"",
162
ssh_cmd.size > 0 ? ssh_cmd.ptr : default_ssh_cmd,
163
- url->port,
+ url->port_specified ? "-p" : "",
164
+ url->port_specified ? url->port : "",
165
url->username ? url->username : "",
166
url->username ? "@" : "",
167
url->host,
0 commit comments