]> asedeno.scripts.mit.edu Git - git.git/blobdiff - send-pack.c
Merge branch 'bk/maint-cvsexportcommit'
[git.git] / send-pack.c
index 1a7397f3a65864524ef735d094d171bca6a0d067..5e127a1b7b33bdc9aaafc80873c5c987573566bd 100644 (file)
@@ -384,7 +384,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;
 
@@ -446,18 +446,16 @@ int main(int argc, char **argv)
 
        if (remote_name) {
                remote = remote_get(remote_name);
-               if (!remote_has_uri(remote, dest)) {
+               if (!remote_has_url(remote, dest)) {
                        die("Destination %s is not a uri for %s",
                            dest, remote_name);
                }
        }
 
-       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;
 }