1
0
Fork 0
mirror of https://github.com/git/git.git synced 2024-05-27 05:16:17 +02:00

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>
This commit is contained in:
Junio C Hamano 2015-10-28 13:52:11 -07:00
parent b42ca3dd0f
commit 1536dd9c1d

View File

@ -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);