提交 c96e3ce6 编写于 作者: J Junio C Hamano

Merge branch 'sf/putty-w-args'

* sf/putty-w-args:
  connect.c: handle errors from split_cmdline
......@@ -730,7 +730,7 @@ static void handle_ssh_variant(const char *ssh_command, int is_cmdline,
const char **ssh_argv;
p = xstrdup(ssh_command);
if (split_cmdline(p, &ssh_argv)) {
if (split_cmdline(p, &ssh_argv) > 0) {
variant = basename((char *)ssh_argv[0]);
/*
* At this point, variant points into the buffer
......
......@@ -427,6 +427,12 @@ test_expect_success 'GIT_SSH_VARIANT overrides plink to tortoiseplink' '
expect_ssh "-batch -P 123" myhost src
'
test_expect_success 'clean failure on broken quoting' '
test_must_fail \
env GIT_SSH_COMMAND="${SQ}plink.exe -v" \
git clone "[myhost:123]:src" sq-failure
'
# Reset the GIT_SSH environment variable for clone tests.
setup_ssh_wrapper
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册