summaryrefslogtreecommitdiff
path: root/builtin-archive.c
diff options
context:
space:
mode:
authorJunio C Hamano <junkio@cox.net>2006-09-10 03:33:34 -0700
committerJunio C Hamano <junkio@cox.net>2006-09-10 18:10:55 -0700
commit23d6d112c004d4242f9dbd8161f79ccdeb47bde8 (patch)
treeab0418341d07ab57d5e84e63e2832c8843a393a9 /builtin-archive.c
parent56f9686c4d1e1d586b731b815bd98d70f84ecda4 (diff)
downloadgit-23d6d112c004d4242f9dbd8161f79ccdeb47bde8.tar.gz
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 <junkio@cox.net>
Diffstat (limited to 'builtin-archive.c')
-rw-r--r--builtin-archive.c6
1 files changed, 3 insertions, 3 deletions
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=<fmt> [--prefix=<prefix>/] [--verbose] [<extra>] <tree-ish> [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);