From: Jeff King Date: Tue, 13 Nov 2007 11:32:03 GMT Subject: Re: [PATCH/RFC 1/3] send-pack: track errors for each ref Message-ID: <20071113113202.GA15845@sigill.intra.peff.net> In-Reply-To: <20071113102709.GA2905@sigill.intra.peff.net> On Tue, Nov 13, 2007 at 05:27:09AM -0500, Jeff King wrote: > Instead of keeping the 'ret' variable, we instead have a > status flag for each ref that tracks what happened to it. > We then print the ref status after all of the refs have > been examined. Argh, this fails t5400 quite badly without the following patch: --- diff --git a/builtin-send-pack.c b/builtin-send-pack.c index 3ac2615..eff84e0 100644 --- a/builtin-send-pack.c +++ b/builtin-send-pack.c @@ -421,6 +421,16 @@ static int do_send_pack(int in, int out, struct remote *remote, const char *dest if (!new_refs) fprintf(stderr, "Everything up-to-date\n"); + for (ref = remote_refs; ref; ref = ref->next) { + switch (ref->status) { + case REF_STATUS_NONE: + case REF_STATUS_UPTODATE: + case REF_STATUS_OK: + break; + default: + return -1; + } + } return 0; }