From 23d6d112c004d4242f9dbd8161f79ccdeb47bde8 Mon Sep 17 00:00:00 2001 From: Junio C Hamano Date: Sun, 10 Sep 2006 03:33:34 -0700 Subject: Add sideband status report to git-archive protocol Using the refactored sideband code from existing upload-pack protocol, this lets the error condition and status output sent from the remote process to be shown locally. Signed-off-by: Junio C Hamano --- builtin-archive.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'builtin-archive.c') diff --git a/builtin-archive.c b/builtin-archive.c index dd7ffc043d..cb883dfe5f 100644 --- a/builtin-archive.c +++ b/builtin-archive.c @@ -10,6 +10,7 @@ #include "tree-walk.h" #include "exec_cmd.h" #include "pkt-line.h" +#include "sideband.h" static const char archive_usage[] = \ "git-archive --format= [--prefix=/] [--verbose] [] [path...]"; @@ -29,7 +30,7 @@ struct archiver archivers[] = { static int run_remote_archiver(const char *remote, int argc, const char **argv) { - char *url, buf[1024]; + char *url, buf[LARGE_PACKET_MAX]; int fd[2], i, len, rv; pid_t pid; const char *exec = "git-upload-archive"; @@ -74,8 +75,7 @@ static int run_remote_archiver(const char *remote, int argc, die("git-archive: expected a flush"); /* Now, start reading from fd[0] and spit it out to stdout */ - rv = copy_fd(fd[0], 1); - + rv = recv_sideband("archive", fd[0], 1, 2, buf, sizeof(buf)); close(fd[0]); rv |= finish_connect(pid); -- cgit v1.2.3