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>
Junio C Hamano committed
Oct 28, 2015 at 13:52 UTC
1536dd9c1df0b7167b139f6666080cc4774ef63f
1 file changed
+1
-1
builtin/column.c
+1
-1
@@ -51,7 +51,7 @@ int cmd_column(int argc, const char **argv, const char *prefix)
51
die(_("--command must be the first argument"));
52
}
53
finalize_colopts(&colopts, -1);
54
- while (!strbuf_getline_lf(&sb, stdin))
54
+ while (!strbuf_getline(&sb, stdin))
55
string_list_append(&list, sb.buf);
56
57
print_columns(&list, colopts, &copts);