Skip to content

Commit 908aace

Browse files
Ilari Liusvaaragitster
authored andcommitted
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 <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent ec014ea commit 908aace

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

builtin/archive.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,8 @@ static int run_remote_archiver(int argc, const char **argv,
4949
if (strcmp(buf, "ACK")) {
5050
if (len > 5 && !prefixcmp(buf, "NACK "))
5151
die(_("git archive: NACK %s"), buf + 5);
52+
if (len > 4 && !prefixcmp(buf, "ERR "))
53+
die(_("remote error: %s"), buf + 4);
5254
die(_("git archive: protocol error"));
5355
}
5456

0 commit comments

Comments
 (0)