Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.kernel.org/pub/scm/git/git.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2015-10-28 23:52:11 +0300
committerJunio C Hamano <gitster@pobox.com>2016-01-15 21:35:07 +0300
commit1536dd9c1df0b7167b139f6666080cc4774ef63f (patch)
treeaae207d7fb80f2f95c0159c72309971caac9cbc5 /builtin/column.c
parentb42ca3dd0f157d0c23c9a034bc68257e1748238a (diff)
column: read lines with strbuf_getline()
Multiple lines read here are concatenated on a single line to form a multi-column output line. We do not want to have a CR at the end, even if the input file consists of CRLF terminated lines. Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'builtin/column.c')
-rw-r--r--builtin/column.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/builtin/column.c b/builtin/column.c
index 40eab08594..33314b4d71 100644
--- a/builtin/column.c
+++ b/builtin/column.c
@@ -51,7 +51,7 @@ int cmd_column(int argc, const char **argv, const char *prefix)
die(_("--command must be the first argument"));
}
finalize_colopts(&colopts, -1);
- while (!strbuf_getline_lf(&sb, stdin))
+ while (!strbuf_getline(&sb, stdin))
string_list_append(&list, sb.buf);
print_columns(&list, colopts, &copts);