diff options
author | Junio C Hamano <junkio@cox.net> | 2006-12-31 00:31:26 -0800 |
---|---|---|
committer | Junio C Hamano <junkio@cox.net> | 2006-12-31 00:31:26 -0800 |
commit | cc06c870685865decc7948cdb2d7e9b52ac8ee32 (patch) | |
tree | 1d16b10b00db62fb571c37be3dde8005ee923ef3 /send-pack.c | |
parent | 27086d0f8418b1961a5fc2bea978f0a5ff37c50d (diff) | |
parent | b5ffa5ceef250ae57b9088ac1de22e783faf7ff8 (diff) | |
download | git-cc06c870685865decc7948cdb2d7e9b52ac8ee32.tar.gz git-cc06c870685865decc7948cdb2d7e9b52ac8ee32.tar.xz |
Merge branch 'jc/send-pack-pipeline'
* jc/send-pack-pipeline:
Documentation: illustrate send-pack pipeline.
send-pack: fix pipeline.
Diffstat (limited to 'send-pack.c')
-rw-r--r-- | send-pack.c | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/send-pack.c b/send-pack.c index cc884f3b2..54de96e40 100644 --- a/send-pack.c +++ b/send-pack.c @@ -58,7 +58,7 @@ static void exec_rev_list(struct ref *refs) /* * Run "rev-list --stdin | pack-objects" pipe. */ -static void rev_list(int fd, struct ref *refs) +static void rev_list(struct ref *refs) { int pipe_fd[2]; pid_t pack_objects_pid; @@ -71,10 +71,8 @@ static void rev_list(int fd, struct ref *refs) * and writes to the original fd */ dup2(pipe_fd[0], 0); - dup2(fd, 1); close(pipe_fd[0]); close(pipe_fd[1]); - close(fd); exec_pack_objects(); die("pack-objects setup failed"); } @@ -85,7 +83,6 @@ static void rev_list(int fd, struct ref *refs) dup2(pipe_fd[1], 1); close(pipe_fd[0]); close(pipe_fd[1]); - close(fd); exec_rev_list(refs); } @@ -111,7 +108,7 @@ static void rev_list_generate(int fd, struct ref *refs) close(pipe_fd[0]); close(pipe_fd[1]); close(fd); - rev_list(fd, refs); + rev_list(refs); die("rev-list setup failed"); } if (rev_list_generate_pid < 0) |