cat-file: read batch stream with strbuf_getline()

It is possible to prepare a text file with a DOS editor and feed it as a batch command stream to the command. Signed-off-by: Junio C Hamano <gitster@pobox.com>

Junio C Hamano committed Oct 28, 2015 at 13:38 UTC b42ca3dd0f157d0c23c9a034bc68257e1748238a
1 file changed +1 -1
builtin/cat-file.c
+1 -1
@@ -401,7 +401,7 @@ static int batch_objects(struct batch_options *opt)
401 save_warning = warn_on_object_refname_ambiguity;
402 warn_on_object_refname_ambiguity = 0;
403
404 - while (strbuf_getline_lf(&buf, stdin) != EOF) {
404 + while (strbuf_getline(&buf, stdin) != EOF) {
405 if (data.split_on_whitespace) {
406 /*
407 * Split at first whitespace, tying off the beginning