diff options
Diffstat (limited to 'send-pack.c')
-rw-r--r-- | send-pack.c | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/send-pack.c b/send-pack.c index 7b776243e..147f44b01 100644 --- a/send-pack.c +++ b/send-pack.c @@ -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; } |