]> git.ipfire.org Git - thirdparty/git.git/blobdiff - transport.c
Documentation: lost-found is now deprecated.
[thirdparty/git.git] / transport.c
index 400af71c76d8cf699778f98b1b07ea7f719701a3..fa5cfbb09d18d4546725e947933b22bb32c3ec2c 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);
@@ -380,7 +380,8 @@ static int disconnect_walker(struct transport *transport)
 }
 
 #ifndef NO_CURL
-static int curl_transport_push(struct transport *transport, int refspec_nr, const char **refspec, int flags) {
+static int curl_transport_push(struct transport *transport, int refspec_nr, const char **refspec, int flags)
+{
        const char **argv;
        int argc;
        int err;
@@ -601,18 +602,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);
 
@@ -651,7 +647,8 @@ static int fetch_refs_via_pack(struct transport *transport,
        return 0;
 }
 
-static int git_transport_push(struct transport *transport, int refspec_nr, const char **refspec, int flags) {
+static int git_transport_push(struct transport *transport, int refspec_nr, const char **refspec, int flags)
+{
        struct git_transport_data *data = transport->data;
        const char **argv;
        char *rem;