Merge branch 'sf/putty-w-args'
authorJunio C Hamano <gitster@pobox.com>
Thu, 20 Apr 2017 04:37:24 +0000 (21:37 -0700)
committerJunio C Hamano <gitster@pobox.com>
Thu, 20 Apr 2017 04:37:24 +0000 (21:37 -0700)
* sf/putty-w-args:
connect.c: handle errors from split_cmdline

1  2 
connect.c
diff --combined connect.c
index 6afde189a3affdc4e196f506d0f561ac260892a9,6f2281ab0f988ffba9d5fa00809d27287bcb3810..568a35f754e41d54dc0e7133bbfaa0d1d02ccb27
+++ 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;
  
                                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;
                }
  
                }
  
                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