From: Jonathan Nieder Date: Sun, 19 Jun 2011 22:42:16 GMT Subject: Re: [PATCH v2 08/20] remote-curl: accept empty line as terminator Message-ID: <20110619224216.GF23893@elie> In-Reply-To: <1308496725-22329-9-git-send-email-srabbelier@gmail.com> Sverre Rabbelier wrote: > --- a/remote-curl.c > +++ b/remote-curl.c > @@ -857,6 +857,8 @@ int main(int argc, const char **argv) > do { > if (strbuf_getline(&buf, stdin, '\n') == EOF) > break; > + if (buf.len == 0) > + break; Thanks. I wonder if that first "if" should be something like if (strbuf_getline(&buf, stdin, '\n') == EOF) { if (ferror(stdin)) fprintf(stderr, "Error reading command stream\n"); else fprintf(stderr, "Unexpected end of command stream\n"); return 1; } to catch I/O errors (e.g., the transport-helper exiting early).