]> git.ipfire.org Git - thirdparty/git.git/blobdiff - send-pack.c
Change git_connect() to return a struct child_process instead of a pid_t.
[thirdparty/git.git] / send-pack.c
index 7b776243e666014521c62276923b3b17fc739fe2..147f44b01d4f7c9e47780ba0d565466050b0adc1 100644 (file)
@@ -365,7 +365,7 @@ int main(int argc, char **argv)
        char *dest = NULL;
        char **heads = NULL;
        int fd[2], ret;
-       pid_t pid;
+       struct child_process *conn;
        char *remote_name = NULL;
        struct remote *remote = NULL;
 
@@ -433,12 +433,10 @@ int main(int argc, char **argv)
                }
        }
 
-       pid = git_connect(fd, dest, receivepack, verbose ? CONNECT_VERBOSE : 0);
-       if (pid < 0)
-               return 1;
+       conn = git_connect(fd, dest, receivepack, verbose ? CONNECT_VERBOSE : 0);
        ret = send_pack(fd[0], fd[1], remote, nr_heads, heads);
        close(fd[0]);
        close(fd[1]);
-       ret |= finish_connect(pid);
+       ret |= finish_connect(conn);
        return !!ret;
 }