1
0
Fork 0
mirror of https://github.com/git/git.git synced 2024-05-23 17:16:18 +02:00

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>
This commit is contained in:
Junio C Hamano 2015-10-28 13:38:56 -07:00
parent 692dfdfa62
commit b42ca3dd0f

View File

@ -401,7 +401,7 @@ static int batch_objects(struct batch_options *opt)
save_warning = warn_on_object_refname_ambiguity;
warn_on_object_refname_ambiguity = 0;
while (strbuf_getline_lf(&buf, stdin) != EOF) {
while (strbuf_getline(&buf, stdin) != EOF) {
if (data.split_on_whitespace) {
/*
* Split at first whitespace, tying off the beginning