Skip to content

Commit b42ca3d

Browse files
committed
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 <[email protected]>
1 parent 692dfdf commit b42ca3d

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

builtin/cat-file.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -401,7 +401,7 @@ static int batch_objects(struct batch_options *opt)
401401
save_warning = warn_on_object_refname_ambiguity;
402402
warn_on_object_refname_ambiguity = 0;
403403

404-
while (strbuf_getline_lf(&buf, stdin) != EOF) {
404+
while (strbuf_getline(&buf, stdin) != EOF) {
405405
if (data.split_on_whitespace) {
406406
/*
407407
* Split at first whitespace, tying off the beginning

0 commit comments

Comments
 (0)