Skip to content

Commit

Permalink
cat-file: read batch stream with strbuf_getline()
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Junio C Hamano committed Jan 15, 2016
1 parent 692dfdf commit b42ca3d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion builtin/cat-file.c
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit b42ca3d

Please sign in to comment.