contrib/hooks/post-receive-email: reformat to wrap comments at 76 chars
[gitweb.git] / transport.c
index 400af71c76d8cf699778f98b1b07ea7f719701a3..d44fe7cee7bd8f0e524eff6b516cd2c8b8c919e2 100644 (file)
@@ -107,7 +107,7 @@ static void insert_packed_refs(const char *packed_refs, struct ref **list)
                return;
 
        for (;;) {
-               int cmp, len;
+               int cmp = cmp, len;
 
                if (!fgets(buffer, sizeof(buffer), f)) {
                        fclose(f);
@@ -601,18 +601,13 @@ static struct ref *get_refs_via_connect(const struct transport *transport)
        struct git_transport_data *data = transport->data;
        struct ref *refs;
        int fd[2];
-       pid_t pid;
        char *dest = xstrdup(transport->url);
-
-       pid = git_connect(fd, dest, data->uploadpack, 0);
-
-       if (pid < 0)
-               die("Failed to connect to \"%s\"", transport->url);
+       struct child_process *conn = git_connect(fd, dest, data->uploadpack, 0);
 
        get_remote_heads(fd[0], &refs, 0, NULL, 0);
        packet_flush(fd[1]);
 
-       finish_connect(pid);
+       finish_connect(conn);
 
        free(dest);