From: Junio C Hamano Date: Thu, 20 Apr 2017 04:37:24 +0000 (-0700) Subject: Merge branch 'sf/putty-w-args' X-Git-Tag: v2.13.0-rc0~3 X-Git-Url: https://git.lorimer.id.au/gitweb.git/diff_plain/c96e3ce62523429a10026c932ceef41eb4aad3dd?hp=-c Merge branch 'sf/putty-w-args' * sf/putty-w-args: connect.c: handle errors from split_cmdline --- c96e3ce62523429a10026c932ceef41eb4aad3dd diff --combined connect.c index 6afde189a3,6f2281ab0f..568a35f754 --- a/connect.c +++ b/connect.c @@@ -111,8 -111,8 +111,8 @@@ static void annotate_refs_with_symref_i */ struct ref **get_remote_heads(int in, char *src_buf, size_t src_len, struct ref **list, unsigned int flags, - struct sha1_array *extra_have, - struct sha1_array *shallow_points) + struct oid_array *extra_have, + struct oid_array *shallow_points) { struct ref **orig_list = list; @@@ -153,7 -153,7 +153,7 @@@ die("protocol error: expected shallow sha-1, got '%s'", arg); if (!shallow_points) die("repository on the other end cannot be shallow"); - sha1_array_append(shallow_points, old_oid.hash); + oid_array_append(shallow_points, &old_oid); continue; } @@@ -169,7 -169,7 +169,7 @@@ } if (extra_have && !strcmp(name, ".have")) { - sha1_array_append(extra_have, old_oid.hash); + oid_array_append(extra_have, &old_oid); continue; } @@@ -730,7 -730,7 +730,7 @@@ static void handle_ssh_variant(const ch 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