Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit a324840

Browse files
committed
ssh: use more compatible git commands over ssh
git runs commands as "git-upload-pack 'path-to-repo'", and some servers enforce the single-quoted syntax. Emulate this.
1 parent dbc19dc commit a324840

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/libgit2/transports/ssh_exec.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -158,7 +158,7 @@ static int get_ssh_cmdline(
158158
else if ((error = git_config__get_string_buf(&ssh_cmd, cfg, "core.sshcommand")) < 0 && error != GIT_ENOTFOUND)
159159
goto done;
160160

161-
error = git_str_printf(out, "%s %s %s \"%s%s%s\" \"%s\" \"%s\"",
161+
error = git_str_printf(out, "%s %s %s \"%s%s%s\" \"%s '%s'\"",
162162
ssh_cmd.size > 0 ? ssh_cmd.ptr : default_ssh_cmd,
163163
url->port_specified ? "-p" : "",
164164
url->port_specified ? url->port : "",

0 commit comments

Comments
 (0)