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>

Ilari Liusvaara committed Oct 3, 2011 at 14:01 UTC 908aaceb92c4fcc983c395350d4a188778ae500d
1 file changed +2
builtin/archive.c
+2
@@ -49,6 +49,8 @@ static int run_remote_archiver(int argc, const char **argv,
49 if (strcmp(buf, "ACK")) {
50 if (len > 5 && !prefixcmp(buf, "NACK "))
51 die(_("git archive: NACK %s"), buf + 5);
52 + if (len > 4 && !prefixcmp(buf, "ERR "))
53 + die(_("remote error: %s"), buf + 4);
54 die(_("git archive: protocol error"));
55 }
56