summaryrefslogtreecommitdiff
path: root/builtin/archive.c
diff options
context:
space:
mode:
authorIlari Liusvaara <ilari.liusvaara@elisanet.fi>2011-10-03 14:01:59 +0300
committerJunio C Hamano <gitster@pobox.com>2011-10-05 09:27:29 -0700
commit908aaceb92c4fcc983c395350d4a188778ae500d (patch)
tree7f833e7c4c03327737bd5807ea73ccdae405af2a /builtin/archive.c
parentec014eac0e9e6f30cbbca616090fa2ecf74797e7 (diff)
downloadgit-908aaceb92c4fcc983c395350d4a188778ae500d.tar.gz
Support ERR in remote archive like in fetch/push
Make ERR as first packet of remote snapshot reply work like it does in fetch/push. Lets servers decline remote snapshot with message the same way as declining fetch/push with a message. Signed-off-by: Ilari Liusvaara <ilari.liusvaara@elisanet.fi> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'builtin/archive.c')
-rw-r--r--builtin/archive.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/builtin/archive.c b/builtin/archive.c
index b14eaba159..6ec06d3e27 100644
--- a/builtin/archive.c
+++ b/builtin/archive.c
@@ -49,6 +49,8 @@ static int run_remote_archiver(int argc, const char **argv,
if (strcmp(buf, "ACK")) {
if (len > 5 && !prefixcmp(buf, "NACK "))
die(_("git archive: NACK %s"), buf + 5);
+ if (len > 4 && !prefixcmp(buf, "ERR "))
+ die(_("remote error: %s"), buf + 4);
die(_("git archive: protocol error"));
}