aboutsummaryrefslogtreecommitdiffstats
path: root/send-pack.c
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2007-11-01 13:47:47 -0700
committerJunio C Hamano <gitster@pobox.com>2007-11-01 13:47:47 -0700
commit4340a813d007b592534de664d152d66417dbe809 (patch)
tree731be77f39c37cd0c6b1ddf5bf8e50f1692ae9e7 /send-pack.c
parent6959893b0b65ebc68ce2fb524a8ec15a26ca4972 (diff)
parent546bb5823249678bc6ad11e65661d896ed83448a (diff)
downloadgit-4340a813d007b592534de664d152d66417dbe809.tar.gz
Merge branch 'js/forkexec'
* js/forkexec: Use the asyncronous function infrastructure to run the content filter. Avoid a dup2(2) in apply_filter() - start_command() can do it for us. t0021-conversion.sh: Test that the clean filter really cleans content. upload-pack: Run rev-list in an asynchronous function. upload-pack: Move the revision walker into a separate function. Use the asyncronous function infrastructure in builtin-fetch-pack.c. Add infrastructure to run a function asynchronously. upload-pack: Use start_command() to run pack-objects in create_pack_file(). Have start_command() create a pipe to read the stderr of the child. Use start_comand() in builtin-fetch-pack.c instead of explicit fork/exec. Use run_command() to spawn external diff programs instead of fork/exec. Use start_command() to run content filters instead of explicit fork/exec. Use start_command() in git_connect() instead of explicit fork/exec. Change git_connect() to return a struct child_process instead of a pid_t. Conflicts: builtin-fetch-pack.c
Diffstat (limited to 'send-pack.c')
-rw-r--r--send-pack.c8
1 files changed, 3 insertions, 5 deletions
diff --git a/send-pack.c b/send-pack.c
index 25053d2c2f..5e127a1b7b 100644
--- a/send-pack.c
+++ b/send-pack.c
@@ -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;
@@ -452,12 +452,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;
}