summaryrefslogtreecommitdiff
path: root/builtin
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2015-10-28 20:38:56 (GMT)
committerJunio C Hamano <gitster@pobox.com>2016-01-15 18:35:06 (GMT)
commitb42ca3dd0f157d0c23c9a034bc68257e1748238a (patch)
treef2f17a0e80dcade1ad582acd77dad179c2fb5b39 /builtin
parent692dfdfa622c6286999609a4fef59724124ca794 (diff)
downloadgit-b42ca3dd0f157d0c23c9a034bc68257e1748238a.zip
git-b42ca3dd0f157d0c23c9a034bc68257e1748238a.tar.gz
git-b42ca3dd0f157d0c23c9a034bc68257e1748238a.tar.bz2
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>
Diffstat (limited to 'builtin')
-rw-r--r--builtin/cat-file.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/builtin/cat-file.c b/builtin/cat-file.c
index d2ebaf1..54db118 100644
--- a/builtin/cat-file.c
+++ b/builtin/cat-file.c
@@ -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