From: Sverre Rabbelier Date: Sun, 19 Jun 2011 15:18:33 GMT Subject: [PATCH v2 08/20] remote-curl: accept empty line as terminator Message-ID: <1308496725-22329-9-git-send-email-srabbelier@gmail.com> In-Reply-To: <1308496725-22329-1-git-send-email-srabbelier@gmail.com> This went unnoticed because the transport helper infrastructore did not check the return value of the helper, nor did the helper print anything before exiting. Signed-off-by: Sverre Rabbelier --- Unchanged. remote-curl.c | 3 +++ 1 files changed, 3 insertions(+), 0 deletions(-) diff --git a/remote-curl.c b/remote-curl.c index 17d8a9b..7e8d50f 100644 --- 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; if (!prefixcmp(buf.buf, "fetch ")) { if (nongit) die("Fetch attempted without a local repo"); @@ -895,6 +897,7 @@ int main(int argc, const char **argv) printf("\n"); fflush(stdout); } else { + fprintf(stderr, "Unknown command '%s'\n", buf.buf); return 1; } strbuf_reset(&buf); -- 1.7.5.1.292.g728120