Re: [PATCH] Support ERR in remote archive like in fetch/push
From: René Scharfe <hidden>
Date: 2016-06-15 22:52:09
Am 03.10.2011 13:26, schrieb Jonathan Nieder:
Ilari Liusvaara wrote:quoted
Oh, and adding interpretation of ERR packets to git archive is easy (and I even happen to have git:// server that can send those to test against): $ git archive --remote=git://localhost/foobar HEAD fatal: remote error: R access for foobar DENIED to anonymous (I also tested that remote snapshotting of repository that should be readable succeeds, it does).Sounds like a good idea to me. Let's see what René thinks; also changing the subject line to attract other reviewers.
Looks good to me, but I'm not too familiar with the remote protocol.
quoted
--- >8 ----From: Ilari Liusvaara <redacted> Date: Mon, 3 Oct 2011 13:55:37 +0300 Subject: [PATCH] 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 <redacted> --- builtin/archive.c | 2 ++ 1 files changed, 2 insertions(+), 0 deletions(-)diff --git a/builtin/archive.c b/builtin/archive.c index 883c009..931956d 100644 --- a/builtin/archive.c +++ b/builtin/archive.c@@ -61,6 +61,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")); }-- 1.7.7.3.g2791de.dirty