[PATCH v4 21/21] test-sha1-array: read command stream with strbuf_getline()
- From
Junio C Hamano <gitster@pobox.com>
- Date
- Jan 14, 2016, 23:58 UTC
- Message-ID
- <1452815916-6447-22-git-send-email-gitster@pobox.com>
- In-Reply-To
- <1452815916-6447-1-git-send-email-gitster@pobox.com>
The input to this command comes from a pipeline in t0064, whose upstream has bunch of "echo"s. It is not unreasonable to expect that it may be fed CRLF lines on DOSsy systems.
Signed-off-by: Junio C Hamano <gitster@pobox.com> --- test-sha1-array.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/test-sha1-array.c b/test-sha1-array.c index 700f3f3..60ea1d5 100644 --- a/test-sha1-array.c +++ b/test-sha1-array.c @@ -11,7 +11,7 @@ int main(int argc, char **argv) struct sha1_array array = SHA1_ARRAY_INIT; struct strbuf line = STRBUF_INIT; - while (strbuf_getline_lf(&line, stdin) != EOF) { + while (strbuf_getline(&line, stdin) != EOF) { const char *arg; unsigned char sha1[20];
-- 2.7.0-250-ge1b5ba3