transport-helper: read helper response with strbuf_getline()

Our implementation of helpers never use CRLF line endings, and they
do not depend on the ability to place a CR as payload at the end of
the line, so this is essentially a no-op for in-tree users.  However,
this allows third-party implementation of helpers to give us their
line with CRLF line ending (they cannot expect us to feed CRLF to
them, though).

Signed-off-by: Junio C Hamano <gitster@pobox.com>
This commit is contained in:
Junio C Hamano 2015-10-28 13:36:00 -07:00
parent 3f16396228
commit 692dfdfa62

View File

@ -54,7 +54,7 @@ static int recvline_fh(FILE *helper, struct strbuf *buffer, const char *name)
strbuf_reset(buffer); strbuf_reset(buffer);
if (debug) if (debug)
fprintf(stderr, "Debug: Remote helper: Waiting...\n"); fprintf(stderr, "Debug: Remote helper: Waiting...\n");
if (strbuf_getline_lf(buffer, helper) == EOF) { if (strbuf_getline(buffer, helper) == EOF) {
if (debug) if (debug)
fprintf(stderr, "Debug: Remote helper quit.\n"); fprintf(stderr, "Debug: Remote helper quit.\n");
return 1; return 1;